@Sheenagoyal21
There are three print statements
cout<<CodingBlocks<<endl;
cout<<Nagarro<<endl;
cout<<HackerBlocks<<endl;
For the first one,
cout<<CodingBlocks<<endl;
CodingBlocks is defined as a signed int variable with value 9 , ( it takes int by default if no other data type is specified with the identifier)
This statement simply prints 9.
For the second one,
cout<<Nagarro<<endl;
Nagarro is defined as a short double variable , so it simply prints 8.8.
However , if you were to run it , this statement would an error since a double variable cannot be made as short.
I am assuming that we are not considering this problem here and giving output based on this assumption , since the actual result of this code would be error.
For the third one ,
cout<<HackerBlocks<<endl;
HackerBlocks is defined as a signed char variable. Do not worry about signed or unsigned here as we are not performing any conversions to int here so it simply doesn’t matter.
We are directly printing HackerBlocks here which has ‘A’ in it . So this statement prints ‘A’.
Final Output :
9
8.8
A