Y

Yashika • 3.75K Points
Extraordinary

Q. Comment on the output of following C code.

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

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics