Consider the Following Example :
int n = 20 , *ptr ; ptr = &n; printf("%d",++*ptr);
Explanation :
- '++' and '*' both have Equal Precedence
- Associativity is from Right to Left ( Expression evaluated from R->L)
- Both are Unary (Operates on single operand )
- So ' * ' is Performed First then ' ++ '
Calculation of Answer :
- ++*ptr = ++ ( *ptr )
- = ++ ( *3058 )
- = ++ ( 20 )
- = 21

0 Comments:
Post a Comment
Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email