Multiple choice

Why does not the following statement work?

char temp[] = Hurry; strcat(temp,'!');

  1. There is no problem in the above statement.

  2. Because the second argument is a character.

  3. Because the first argument is of type char*.

  4. The strcat declaration also takes length of string as an argument.

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

 The string function strcat( ) concatenates strings and not a character.