C | Macro & Preprocessor | Question 14
#include <stdio.h> #define get(s) #s int main() { char str[] = get(GeeksQuiz); printf ( "%s" , str); return 0; } |
(A) Compiler Error
(B) #GeeksQuiz
(C) GeeksQuiz
(D) GGeeksQuiz
Answer: (C)
Explanation: The preprocessing operator ‘#’ is used to convert a string argument into a string constant.
Quiz of this Question
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.