+ 1
6th May 2021, 12:36 PM
Wah Wah Shwe(ģ™€ģ™€ģµ€)
Wah Wah Shwe(ģ™€ģ™€ģµ€) - avatar
3 Answers
+ 5
Wah Wah Shwe(ģ™€ģ™€ģ‡„) Macros aren't functions . they are just like copy-pasting during compile time. #define sqr(x) x*x During compile time compiler will replace every sqr(x) with x*x Like sqr(5+2) => 5+2*5+2
6th May 2021, 1:18 PM
TOLUENE
TOLUENE - avatar
+ 1
Wah Wah Shwe(ģ™€ģ™€ģ‡„) Define like this #define sqr(x) (x)*(x)
6th May 2021, 1:44 PM
TOLUENE
TOLUENE - avatar
0
YUGRAJ, I tested like this. But the answer is the same. I've to learn C language again to understand this.
6th May 2021, 1:43 PM
Wah Wah Shwe(ģ™€ģ™€ģµ€)
Wah Wah Shwe(ģ™€ģ™€ģµ€) - avatar