🎴 Flashcard Mode
C++ Programming Fundamentals
Card1 / 20
Mastered0
Review0
QuestionClick to flip
void main() { char *p = "ayqm"; char c; c = ++*p++; printf("%c",c); }
AnswerClick to flip back
A
b
💡 Explanation:
The expression ++p++ combines pre-increment (++), dereference (), and post-increment (++). Pre-increment has highest precedence: ++*p means increment the value p points to ('a' becomes 'b'). Then p++ advances the pointer. So c gets 'b'.