Multiple choice softskills creativity

Output????? #include #define f(a,b) a##b #define g(a) #a #define h(a) g(a) int main() { printf("%s",h(f(1,2))); printf("%s",g(f(1,2))); return 0; }

  1. 1212

  2. 121.2

  3. 12f(1,2)

  4. 12f(12)

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

The macro f(a,b) uses ## (token pasting) to concatenate 1 and 2 into 12. Macro h(a) calls g(a) which stringifies with #a. So h(f(1,2)) becomes g(12) then f(1,2) as string literal. The first printf outputs f(1,2). The second printf calls g(f(1,2)) directly, which stringifies to 12. Output: f(1,2)12.