Interviews Questions, Algorithms, Aptitude, C Interview Program, C Theory Question, Aptitude Tricks, Test Series,

Tuesday 26 March 2019

Null Pointer

Null Pointer:

A NULL pointer is a pointer which is pointing to nothing. A NULL pointer points the base address of the segment.

Examples of NULL pointer:

1. int *ptr=(char *)0;
2. float *ptr=(float *)0;
3. char *ptr=(char *)0;
4. double *ptr=(double *)0;
5. char *ptr=’\0’;
6. int *ptr=NULL;

C program













Output: (null)

0 comments:

Post a Comment