#include<stdio.h>
int main ()
{
int *b;
printf("The value is %d\n",*b);
return 0;
}
Here, in this program, the pointer b is uninitialised. When I run the program I always get the value 0. Shouldn't the pointer b always give different values like the garbage values, just like when we declare an uninitialised variable, like in this program:
#include<stdio.h>
int main()
{
int a;
printf ("The garbage value of a is = %d\n",a);
return 0;
}