Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int var = 151;
    int *p1 = &var;
    int **p2 = &p1;
    printf("%d, %d, %d\n", var, *p1, **p2);
    }
    1. Garbage value, 151, 151
    2. 151, 151, Garbage value
    3. Compilation Error
    4. 151, 151, 151
    5. None of these
Correct Option: D

151, 151, 151



Your comments will be displayed only after manual approval.