Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int a = 1, b = 2, c = 3;
    int *ptr1 = &a, *ptr2 = &b, *ptr3 = &c;
    int **sptr = &ptr1; //-Ref
    *sptr = ptr2;
}

A. ptr1 points to a

B. ptr1 points to b

C. sptr points to ptr2

D. none of the mentioned

Answer: Option B


This Question Belongs to C Program >> Pointer

Join The Discussion

Related Questions on Pointer