yes, try changing %f to %d somewhere, answers will come right , but can
anyone epalin the reason that if garbage values were to be printed , i am
having same garbage values on my machine as on his :P. How is that answers
and output comes out to be same
On Sat, Jul 23, 2011 at 12:56 AM, rajeev
#includestdio.h
void main()
{
int x;
float t;
scanf(%f,t);
printf(%f\n,t);
x=90;
printf(%f\n,x);
{
x=1;
printf(%f\n,x);
{
x=30;
printf(%f\n,x);
}
printf(%f\n,x);
}
x==9;
printf(%f\n,x);
I think when the mismatch of the format specifier and the variable occurs ,
the compiler generates random number output as, some garbage I suppose .
On Sat, Jul 23, 2011 at 12:30 AM, geek forgeek geekhori...@gmail.comwrote:
#includestdio.h
void main()
{
int x;
float t;