Literals in C++

Q2. What are literals in C++ ? How many types of literals are allowed in C++ ?

Ans. Literals mean constants that is, the data items that never change value during a program run.

C++ allows four types of literals:

1. Integer literal

2. Character literal

3. Floating Point literal

4. String literal

Leave a Reply

Your email address will not be published. Required fields are marked *