In the quiz there was a question-
"/* Output ? */
#include
using namespace std;
int main(){
long signed CodingBlocks = 2017;
short unsigned BOSS1 = -2018;
unsigned BOSS2 = -2019;
int BOSS3 = -2020;
long long unsigned BOSS4 = -2021;
short unsigned Nagarro = 2018.9;
long signed HackerBlocks = ‘A’;
cout<<CodingBlocks<<endl;
cout<<BOSS1<<endl<<BOSS2<<endl<<BOSS3<<endl<<BOSS4<<endl;
cout<<Nagarro<<endl;
cout<<HackerBlocks<<endl;
return 0;
}"
Here, only " long signed", “short unsigned”…e.t.c is mentioned.
Should it not be "long signed int ".
The point is that the data type has not been mentioned next to signed,unsigned…
Also, please explain the answer as well. We have to predict output. Couldnt understand that as well.
Thanks