Which of the following is a string literal constant?

The correct answer is: E. All of the above

A string literal constant is a sequence of characters enclosed in double quotes. It can be a single character, a string of characters, or a numeric literal.

In the following examples, all of the options are string literal constants:

  • “Visual C++”
  • “137.45”
  • “A”
  • “2,365”

String literal constants are stored in memory as a sequence of characters. They can be used in expressions, as function arguments, and as the values of variables.

Exit mobile version