Examveda
Examveda

What substitution should be made to //-Ref such that ptr1 points to variable c in the following C code?
#include <stdio.h>
int main()
{
    int a = 1, b = 2, c = 3;
    int *ptr1 = &a;
    int **sptr = &ptr1;
    //-Ref
}

A. *sptr = &c;

B. **sptr = &c;

C. *ptr1 = &c;

D. none of the mentioned

Answer: Option A


This Question Belongs to C Program >> Pointer

Join The Discussion

Related Questions on Pointer