Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which of the following declaration is not supported by C?

  • A.String str;
  • B.char *str;
  • C.float str = 3e2;
  • D.Both (a) and (c)

Answer: A

Correct answer: String str;

C has no String type; a string is an array of char terminated by a null, or a pointer to one. The other two declarations are perfectly valid: char *str is a pointer to char, and 3e2 is simply 300 written in exponential form.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.