Top

Discussion

What will be the output of the following C code?

#include 
    int main()
    {
        int i = 11;
        int *p = &i;
        foo(&p);
        printf("%d ", *p);
    }
    void foo(int *const *p)
    {
        int j = 10;
        *p = &j;
        printf("%d ", **p);
    }

 

  • A.Compile time error
  • B.10 10
  • C.Undefined behaviour
  • D.10 11

Answer: A

No answer description available for this question.

No comment is present. Be the first to comment.
Loading…

Post your comment