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

Tuesday 26 March 2019

Wild Pointer

Wild Pointer:


A pointer in c which has 

not been initialized is 

known as wild pointer.


Example:


C program:


#include<stdio.h>

int main(){

int *ptr;

printf("%u\n",ptr);

printf("%d",*ptr);

return 0;

}


Output: Any address

Garbage value


Here ptr is a wild pointer 

because it has not been 

initialized. 

0 comments:

Post a Comment