0

Need output explanation

Someone please explain how the answer is 65 for the below CODE. #define x 10+5 Int main() { int a=x*x; printf("%d",a); return 0; }

25th Mar 2020, 4:47 PM
SUDHEER
SUDHEER - avatar
3 Réponses
25th Mar 2020, 4:53 PM
Raj Chhatrala
Raj Chhatrala - avatar
+ 3
x is 10+5 So a = x*x = 10+5*10+5 According to BODMAS or operator precedence, multiplication is performed first. So 50+15=65.
25th Mar 2020, 4:50 PM
Avinesh
Avinesh - avatar
0
Thank you all now I have understood.
25th Mar 2020, 4:58 PM
SUDHEER
SUDHEER - avatar