what is the difference between 'B' and "B" in c++ ?
Answers
Answered by
0
Answer:
"B' is a character whereas "B" is a string
Answered by
0
The difference between 'B' and "B" in C++ is:
- 'B' in c++ represents a character that is used to store letters. Each character in C++ has some ASCII values which is an integer value that is understood by the computer. Whenever a character is entered in C++ it gets stored as an integer. The single quotes ' ' represents that the value entered is a character.
- "B" in c++ represents a string that is used to store a sentence or simply a text. The C++ language contains two types of string representations that is the C-style character string and the standard string class by C++. The double quotes " " indicate that the value entered is a string.
Similar questions