write a statement that declares char variable named gender initialized to the character m in c++
additionally,
What is the value of number after the following code executes?
int a=5;
int b=10;
int number = a++ + b++;
lastly,
The break; is required in every case block of a switch statement true or false
and A default block is required in every switch statement true or false
1) char gender = 'm'; 2) 15 Explanation: ------------- number = a++ + b++; a++ and b++ increments a and b, but returns their old values so, number = 5+10 = 15 3) False break; is only required in cases where we don't want the fall through mechanism. if we want to run two cases in sequence, then we don't use break. we won't get any errors if break; is not used after every case. 4) False Again, default is used to handle cases which were not mentioned. but that's not mandatory.
Get Answers For Free
Most questions answered within 1 hours.