the char and bool both are taking one byte right?
Quiz problem Array seciton
yes , the both take 1 byte
so char>bool or bool>char
in terms of size they are same , the value they take can give you different values like ‘a’>true as both of them are typecasted to there correspponding int value like for ‘a’>true as ‘a’ is 97 and true is 1 in int
‘\0’ said no …
@O17LPOLA020023 and also explain or give reference for some docs about
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;
this giving some different output like address value
whenever you are comparing then the comparison has to be on some criteria , like size , value etc
the reason is that you are passing -ve value to an unsigned integers which only takes positive value
unsigned BOSS2 = -2019;
long long unsigned BOSS4 = -2021;
short unsigned Nagarro = 2018.9;
can you explain in which context are you talking about, 2^16 and 2^32, is there any printing issue
which 5 questions are you refering to ?
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.