hello all
i have been writing the java code and new to C programing.I am very confused in point.i have the following code
#include<stdio.h>
main()
{
int *ptr=50;
printf("%d",*ptr);
return 0;
}
~
~
why it is giving the segmentation fault.and when i print ptr then it gives value 50.and when i print &ptr it gives some long negative value.
Please explain all these three output so my doubts will be cleared.