Vidyalelo
C Programming · Q116

Pointer

Programming · C Programming · question 116

Q116

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

A.
*sptr = &c;
Answer
B.
**sptr = &c;
C.
*ptr1 = &c;
D.
none of the mentioned

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board