Multiple choice

Which one is equivalent to the following statements? (I) #define abc(x) #x (II) cout<<abc(test);

  1. cout<<test;

  2. cout<<abc(#test);

  3. cout<<abc(“test”);

  4. cout<<”test”;

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The given statements simply print the word “test”, #define abc(x) #x cout<<abc(test); is equivalent to cout<<”Test”;