Q:

When we assign one arithmetic type to another

0

When we assign one arithmetic type to another

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

bool b = 42;                       // b is true
int i = b;                            // i has value 1
i = 3.14;                            // i has value 3
double pi = i;                   // pi has value 3.0
unsigned char c = -1;       // assuming 8-bit chars, c has value 255
signed char c2 = 256;     // assuming 8-bit chars, the value of c2 is undefined

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now