The difference between x and ‘x’ is?

a) The first one refers to a variable whose identifier is x and the second one refers to the character constant x
b) The first one is a character constant x and the second one is the string literal x
c) Both are same
d) Both are string literal

1 thought on “The difference between x and ‘x’ is?”

  1. a
    Explanation: In a C++ code, names with quotes like ‘x’ represent a character or string(in case of a collection of characters) whereas without quotes they represent an identifier.

Leave a Comment