If I write
Code:
void main()
{  
int x;
float y;
char z;
printf("\nx=%d",x);
printf("\ny=%d",y);
printf("\nz=%d",z);
getch();
}
OUTPUT:
x=-28852
y=0.000000
z=!!
But if I declare x,y and z in global declaration section then output comes
x=0
y=0.000000
z= (here comes cursor after one blankspace).
why?

Last edited by shabbir; 12Jun2007 at 22:54.. Reason: Code block - http://www.go4expert.com/forums/misc.php?do=bbcode#code