We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I've problem with asterisk in printf, please help, I changed Hello world example as follows : #include<stdio.h> float f,g; f = 10.0; g = 22.95; // printf ("Hello World\n"); /* printf ("%*f != %*g\n", 8, f, 8, g); and the result is: //about 50 empty Spaces// 0.000000 =! //about 50 empty spaces// -1.59232e-23 this example is taken directly from C51 manual page 295! but it dosn't work, I also tried many other small variations but with no success it seems printf thinks that f and g are pointers! meanwhile printf without asterisk works fine. please anybody can help! thankyou in advance
God bless you andrew! ANSI integer promotion rules was enabled, but type casting never came to my mind, you just solved the problem. I don't know why but sometimes I become so dumb! God Bless You!