To get a statement from the user input in the array char s[100]:

  1. gets( s[100] );

  2. gets( s[] );

  3. gets( s );

  4. none of the above


Correct Option: C

AI Explanation

To get a statement from the user input in the array char s[100], the correct option is C. gets( s );

Explanation:

A. gets( s[100] ); - This option is incorrect because s[100] is accessing the 100th element of the array s, which is not a valid argument for the gets() function.

B. gets( s[] ); - This option is incorrect because s[] is not a valid argument for the gets() function. The [] should be followed by an index or a range of indices to specify which elements of the array to access.

C. gets( s ); - This option is correct because s is the correct argument to pass to the gets() function. It allows the user to input a string and store it in the array s.

D. None of the above - This option is incorrect because option C, gets( s );, is the correct option to get a statement from the user input in the array char s[100].

Therefore, the correct answer is C.

Find more quizzes: