Multiple choice

What will this piece of C code print on the screen?

Printf (“hello world”);

/*this is a comment
Printf (“hello again”); This is another comment*/

  1. Only “hello world”

  2. Only “hello again”

  3. Both (1) and (2)

  4. None of these

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

In C, the comment block starts with /* and ends with */. Everything between these markers is ignored by the compiler, so the second Printf statement is never executed.