Quiz problem Array seciton

the char and bool both are taking one byte right?

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

@O17LPOLA020023 so the it always then the character is going to greater.

‘\0’ said no …

@O17LPOLA020023 okay so what should be answer because is depends input we have

@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;

@O17LPOLA020023 and what about the 2^16 and 2^32

can you explain in which context are you talking about, 2^16 and 2^32, is there any printing issue

@O17LPOLA020023 ya actually i not getting the 5 question can you checkout that please

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.