Hello all,
I am confused with the Output of the Following Program which is mentioned below.
int main( )
{
int c = 10;
printf(c);
}
The Output here is segmentation Fault when i compiled the program with gcc-4.1.2
The Same program when i remove the initialization of c & compile it the Junk value is been printed.
int main( )
{
int c;// = 10;
printf((int *)c);
}
Output : U��WVS�Py
Can anyone explain why is it so..
Thanks
With Regards