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

51, 51, 51



Your comments will be displayed only after manual approval.