Wild pointer questions with explanation

Wild pointer questions and explanation in c language

A pointer in c which has not been initialized is known as wild pointer. For Example:

What will be output of following c program?

int main(){
int *ptr;
printf("%d",*ptr); return 0;

Any address
Garbage value

Here ptr is wild pointer because it has not been initialized.
There is difference between the NULL pointer and wild pointer. Null pointer points the base address of segment while wild pointer doesn’t point any specific memory location.

Generic pointer
Null pointer
Wild pointer
Dangling pointer
Near pointer
Far pointer
Graphics video memory
Text video memory
Huge pointer
Memory model in C
C tutorial

If you have any queries in above wild pointers questions in c, you can ask here. 

No comments: