Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int var[4] = {11, 21, 31, 41};
    int *ptr1 = var;
    int **ptr2 = &ptr1;
    printf("%p %p", *ptr2, var);
    }
    1. Same memory address is printed.
    2. Different memory address is printed.
    3. 11, 21, 31, 41
    4. 41, 31
    5. None of these
Correct Option: A

Same memory address is printed.



Your comments will be displayed only after manual approval.