Examveda
Examveda

Comment on the output of following C code.
#include <stdio.h>
main()
{
    char *p = 0;
    *p = 'a';
    printf("value in pointer p is %c\n", *p);
}

A. It will print a

B. It will print 0

C. Compile time error

D. Run time error

Answer: Option D


This Question Belongs to C Program >> C Miscellaneous

Join The Discussion

Related Questions on C Miscellaneous