Welcome to Nesso Academy. In this lecture, we will focus on understanding literal constants.
45
3.14159
'A'
"Hello World"
Initializing Variables:
double D{5.6};
uses a floating point literal to initialize a variable.Printing on Screen:
cout << "Hello World";
uses a string literal to print directly using the cout
object.Using in Expressions:
5 + 6 / 11;
uses integer literals in an arithmetic expression.Thank you for attending this lecture. In the next session, we will explore different types of literals.