Multiple choice c

To write statement hi world:

  1. puts('hi world');

  2. puts("hi world");

  3. Both correct

  4. Both wrong

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

The puts() function expects a pointer to a string (char *). Option A uses single quotes, which denote a single character (integer literal), causing a type mismatch or error. Option B correctly uses double quotes for a string literal.