- 5

Fill in the blanks to define the macro SQR if the TRIPLE macro is defined, otherwise define TRIPLE.

#______TRIPLE #define SQR(x) (x) * (x) #______ #define TRIPLE(x) (x) * 3 #________

15th Jul 2020, 2:25 AM
Nikhil Salke
Nikhil Salke - avatar
3 ответов
+ 5
Why don't you try to solve it yourself?
15th Jul 2020, 2:50 AM
Nilesh
Nilesh - avatar
+ 1
#ifdef TRIPLE #define SQR(x) (x) * (x) #else #define TRIPLE(x) (x) * 3 #endif
10th Jun 2022, 10:20 AM
M M U Lahiru Maduranga
M M U Lahiru Maduranga - avatar
0
Have a look at preprocessor directives: between them ifdef, else, endif
15th Jul 2020, 3:27 AM
Bilbo Baggins
Bilbo Baggins - avatar