What happens when we use arrow operator on NULL structure pointer ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What happens when we use arrow operator on NULL structure pointer ?

For eg : typedef struct Node { int data; struct Node *link; } Node; //Pointer to the structure "Node" Node *start=NULL; printf("This prints %d",start->data);

29th Feb 2020, 2:55 PM
Chris Jones
Chris Jones - avatar
1 Answer
0
Have you tried test running the code inside Code Playground? It triggers error. Seriously, what did you expect trying to access a pointer that points to a non valid data?
29th Feb 2020, 3:21 PM
Ipang