Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int p = 1, q = 2, r = 3;
    int *p1 = &p, *p2 = &q, *p3 = &r;
    int **p4 = &p1; //-Reference
    *p4 = p2;
    }
    1. p4 points to p2
    2. p1 points to p
    3. p1 points to q
    4. All of above
    5. None of these
Correct Option: A

p4 points to p2



Your comments will be displayed only after manual approval.