Each type will have a literal representation, so an integer will be numeric represented without the
decimal point if it is assigned integer.
The literal can also use the plus or minus symbol to indicate the sign.
Similarly, a real number can have a literal value that contains a decimal point, and you may even
use the scientific format, including an exponent.
So C++ has a various rules to use when specifying literals in code.
And these will be covered in next lecture, of course.
So some examples in literals I will show you here.
For example, let's create an integer named.
And a poke here plus one.
And then integer knock.
Here's your here minus one and the double here, micro here, one E, six here.
And double double unit here.
Double unit here.
One point here.
Just a one point and steady string name here, for example, Oxo.
And note that the unit variable, the compiler knows that the literal is a real number because the value
has a decimal point.
So for integers you can provide a hexadecimal literal in your code by prefacing the number with zero
x here for example, integer the integer my x here zero x 100 zero x 100 here.
So this is 256 in in decimal.
The simple.
Let's see what zero x?
Means here, Plaintiff.
A decimal.
So decimal point.
And my ex.
Let's see as you can see here, zero X or 100.
So here's the hexadecimal number type.
And when you print this with the decimal format specified, you will get 256 integer by integer here.
So.
So these these are the integers of as well.
Of course, this is a different numbering system.
So.
But by default the outward stream will print and the market values in base 11 as shown here.
So however, you can insert a manipulator into an output stream to tell it to use a different number
base.
So the different the default behavior is here, steady this here deck here, which means the numbers
should be displayed as base ten and std std octal.
So it's the octal means that display as a octal base base eight and this is decimal.
Decimal base ten.
Let's write it here.
Octal base eight.
And so.
What's next here?
So we got the best 16 as well.
So I'm sorry.
I see the hex here based 16.
So this means this play as a hexadecimal here, which is hexadecimal decimal base 16.
Let's see here.
Yes.
And if you prefer to see the perfect that check your check.
They use the three manipulator as the show base as shown here.
See the show based show base here.
Like this.
So C++ defines some literals.
So for bool, the logic type, there are true and false constants here.
Let's make this comment because we will not write any codes on it for now.
So as you know, logic type is a true or false.
So where false is zero and true is one.
So there is also no PR constant.
Again, zero, which is used as invalid value for any pointer type.