Home Subjects C Programming Pointers

C Programming
Pointers

C language from basics to advanced placement prep

21 Q 10 Topics Take Mock Test
Advertisement
Difficulty: All Easy Medium Hard 21–21 of 21
Topics in C Programming
Q.21 Hard Pointers
What is the difference between *p++ and (*p)++?
A No difference
B *p++ increments pointer, (*p)++ increments value
C (*p)++ increments pointer, *p++ increments value
D Syntax error
Correct Answer:  B. *p++ increments pointer, (*p)++ increments value
EXPLANATION

Due to operator precedence, *p++ is equivalent to *(p++), incrementing the pointer. (*p)++ explicitly increments the value.

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