ProgrammingVery hardProduct company OA

What is printed?

What is printed?
#define STR(x) #x
printf("%zu", strlen(STR(  a   +   b  )));
  1. A. 5
  2. B. 15
  3. C. 11
  4. D. 3

Correct answer: A. 5

When an argument is stringised, leading and trailing white space is removed and each run of white space between tokens becomes one space. The result is "a + b", 5 characters. '3' drops all spaces; '11' keeps them as written.

More C Programming questions

Exams that ask this topic