M Mỹ Duyên New member Sep 18, 2021 #1 What will be the output of the following C code? Code: #include<stdio.h> #define inline inline f(char a) { #ifdef inline printf("%c",a); #endif } main() { f('a'); } A. Error B. a C. No error but nothing will be printed as output D. 97
What will be the output of the following C code? Code: #include<stdio.h> #define inline inline f(char a) { #ifdef inline printf("%c",a); #endif } main() { f('a'); } A. Error B. a C. No error but nothing will be printed as output D. 97
Đ Đức Lưu New member Sep 18, 2021 #2 Answer: b Explanation: In the code shown above, we have defined identifier names inline using the macro #define. The output will be printed only if inline is defined. Since it is defined, ‘a’ is printed as output. Upvote 0 Downvote
Answer: b Explanation: In the code shown above, we have defined identifier names inline using the macro #define. The output will be printed only if inline is defined. Since it is defined, ‘a’ is printed as output.