OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024

OOPS

Question 65
‘ptrdata’ is a pointer to a data type. The expression *ptrdata++ is evaluated as (in C++) :
A
*(ptrdata++)
B
(*ptrdata)++
C
* (ptrdata) ++
D
Depends on compiler
Question 65 Explanation: 
Normally ++ having higher precedence than * but both are unary operators in C++.
So, the precedence ptrdata++ will evaluate first. So, we are given parenthesis (ptrdata++).
Second precedence is * and finally *(ptrdata++)
Correct Answer: A
Question 65 Explanation: 
Normally ++ having higher precedence than * but both are unary operators in C++.
So, the precedence ptrdata++ will evaluate first. So, we are given parenthesis (ptrdata++).
Second precedence is * and finally *(ptrdata++)

Leave a Reply

Your email address will not be published. Required fields are marked *