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).