C | Macro & Preprocessor | Question 7
# include <stdio.h>
# define scanf "%s Geeks Quiz "
(A) Compiler Error
(B) %s Geeks Quiz
(C) Geeks Quiz
(D) %s Geeks Quiz Geeks Quiz
Explanation: After pre-processing phase of compilation, printf statement will become.
printf(“%s Geeks Quiz “, “%s Geeks Quiz “);
Now you can easily guess why output is “%s Geeks Quiz Geeks Quiz”.
Attention reader! Don’t stop learning now. Get hold of all the important C++ Foundation and STL concepts with the C++ Foundation and STL courses at a student-friendly price and become industry ready.