What is difference between uninitialized pointer and null pointer?
An uninitialized pointer is a pointer which points unknown memory location while null pointer is pointer which points a null value or base address of segment.
int *p; //Uninitialized pointer
int *q= (int *)0; //Null pointer
int *r=NULL; //Null pointer
What will be output of following c program?
char *p; //Uninitialized pointer
char *q=NULL; //Null pointer;
Output: cquestionbank (null)