Question:

Given below are two statements :
one is labelled as
Assertion (A) and the other is labelled as
Reason (R).
Assertion (A) :
++*ptr in C increments the value pointed by ptr.
Reason (R) :
ptr is a pointer.
In the light of the above statements, choose the most appropriate answer from the options given below :

Show Hint

Unary operators go Right-to-Left! ++*ptr means increment the value. If you wanted to increment the address, you'd use *++ptr.
Updated On: Oct 3, 2026
  • Both (A) and (R) are correct and (R) is the correct explanation of (A)
  • Both (A) and (R) are correct but (R) is not the correct explanation of (A)
  • (A) is correct but (R) is not correct
  • (A) is not correct but (R) is correct
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Understanding the Question:

Assertion (A) says ++*ptr in C increments the value pointed to by ptr, and Reason (R) says ptr is a pointer.

Step 2: Detailed Explanation:


• The unary operators ++ and * have the same precedence and associate right to left, so ++*ptr is evaluated as ++(*ptr).

• ptr is a pointer, so *ptr dereferences it to give the object it points to; the prefix ++ is then applied to that object, i.e. the pointed value is incremented and the pointer itself is unchanged. Hence (A) is correct.

• (R) is true, and it is the reason the expression works this way: because ptr is a pointer, *ptr refers to the pointed value, which is what ++ increments. As per the NTA final answer key (R) is taken as the correct explanation of (A).

Step 3: Final Answer:

Both (A) and (R) are correct and (R) is the correct explanation of (A). The correct option is (A) Both (A) and (R) are correct and (R) is the correct explanation of (A).
Was this answer helpful?
0
0

Top CUET PG Data Science A.I Cyber Security and Computer Sci. Questions

View More Questions

Top CUET PG Programming and Data Structures Questions

View More Questions