Social Sciences, asked by Mohit0000, 1 year ago

Comment on the output of following code:

#include <stdio.h> main() { char *p = 0; *p = 'a'; printf("value in pointer p is %c\n", *p); }

Answers

Answered by GhaintMunda45
0

Code

Input

#include <stdio.h>

main()

{

char *p = 0;

*p = 'a';

printf("value in pointer p is %c\n", *p);

}

Output

$ cc pgm.c

$ a.out

Segmentation fault (core dumped)

Answered by utkarsh8791
0

sorry friend I don't know this answer

so sorry

Similar questions