hello every1..
m a newbie to programming and am seeking help for this simple question i have...
#include<stdio.h>
main()
{
int a;
printf("%d",a);
}
the output for the above program gives me something as 19345234...
the value being displayed here is the location of the memory? or simply some garbage value tat already occupies the memory block from before...?
wat should i add to this program so that the output displayed is null...?
It's the value of the variable a. a is located on the stack. Since you haven't assigned anything to it, whatever bits happened to be set in that location are interpreted as an int and printed.
Bookmarks