Home Subjects C Programming Pointers

C Programming
Pointers

C language from basics to advanced placement prep

51 Q 10 Topics Take Mock Test
Advertisement
Difficulty: All Easy Medium Hard 51–51 of 51
Topics in C Programming
Q.51 Medium Pointers
What is the output?
int a = 5;
int *p = &a;
int **q = &p;
printf("%d", **q);
A 5
B Address of a
C Address of p
D Compilation error
Correct Answer:  A. 5
EXPLANATION

q is a pointer to pointer p. **q dereferences q to get p, then dereferences p to get the value 5.

Test
IGET
IGET AI
Online · Exam prep assistant
Hi! 👋 I'm your iget AI assistant.

Ask me anything about exam prep, MCQ solutions, study tips, or strategies! 🎯
UPSC strategy SSC CGL syllabus Improve aptitude NEET Biology tips