Q8. What are literals? How many types of integer literals are available in C++?

Ans. Literals (often referred to as constants) are data items that never change their value during a program run.

C++ allows three types of integer constants:

  1. Decimal (base 10),
  2. Octal (base 8),
  3. Hexadecimal (base 16).

Leave a Reply

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

%d bloggers like this: