+ 3

Please explain me this

Signed char chr=128; Printf("%d",chr); What is the answer and how??

3rd Mar 2020, 11:15 AM
Gaurav Rawat
Gaurav Rawat - avatar
2 Answers
+ 4
Range of signed char is from -128 to +127 So when you assigned "chr" with integral value 128. System could not accomodate it in "chr" so it cycles back to -128 and displays it.
3rd Mar 2020, 11:35 AM
Arsenic
Arsenic - avatar
0
I wanna to be perfect in c++ please help me
31st Mar 2023, 7:45 PM
Merry Pink
Merry Pink - avatar