V Võ Kiều Member Sep 21, 2021 #1 What will be the output of the following C code? Code: #define display(a) #a main() { printf(display("56#7")); } A. Error B. “56#7” C. 56#7 D. 567
What will be the output of the following C code? Code: #define display(a) #a main() { printf(display("56#7")); } A. Error B. “56#7” C. 56#7 D. 567
N Nguyễn Thanh Uyên New member Sep 21, 2021 #2 Answer: b Explanation: In this case, it is not necessary for the argument in the printf function to be enclosed in double quotes. However, if the argument is enclosed in double quotes, no error is thrown. The output of the code shown will be “56#7”. Upvote 0 Downvote
Answer: b Explanation: In this case, it is not necessary for the argument in the printf function to be enclosed in double quotes. However, if the argument is enclosed in double quotes, no error is thrown. The output of the code shown will be “56#7”.