Question: c++ help Question 40 1.25 pts Which expressions for YYY and ZZZ correctly output the indicated ranges? Assume int x's value will be o or

c++ help
c++ help Question 40 1.25 pts Which expressions for YYY and ZZZ
correctly output the indicated ranges? Assume int x's value will be o
or greater. Choices are in the form YYY / ZZZ. if (YYY)
{ // Output "-29" } else if (ZZZ) { // Output "30-39"
} else { // Output "40+" } O x = 30 Ox
29 / x > 40 Ox= 29 Which expression follows the practice
of using parentheses to make the intended order of evaluation explicit? *
> y 66 !a = b (x > (y)) 86 ((!a ==
b)) ((x > y)) && ((!a = b)) (x > y) &&
(!a == b) ((x > y) && !a = (b)) Question 39
1.25 pts For the string "Orange", what character is at index 3?
n 8 O o Or a Question 37 1.25 pts For what
values of x does the default case execute in the code below?

Question 40 1.25 pts Which expressions for YYY and ZZZ correctly output the indicated ranges? Assume int x's value will be o or greater. Choices are in the form YYY / ZZZ. if (YYY) { // Output "-29" } else if (ZZZ) { // Output "30-39" } else { // Output "40+" } O x = 30 Ox 29 / x > 40 Ox= 29 Which expression follows the practice of using parentheses to make the intended order of evaluation explicit? * > y 66 !a = b (x > (y)) 86 ((!a == b)) ((x > y)) && ((!a = b)) (x > y) && (!a == b) ((x > y) && !a = (b)) Question 39 1.25 pts For the string "Orange", what character is at index 3? n 8 O o Or a Question 37 1.25 pts For what values of x does the default case execute in the code below? x is declared as an integer. switch (x) { case 2: break; case 3: break; case 4: ... break; default: ... // When does this execute? } For any value Only for values that are not 2, 3, or 4 Only for value 5 Only for all values greater than 4 Lection 20 1.25nto Case numItems = 1; case 'X': numItems = 2; case 'Y': numItems = 3; case 'Z': numItems = 4; } 3 O2 0 4 Question 36 1.25 pts For what values of x will "Medium" be output? If x > 40: Output "Large" Else If x > 20: Output "Medium" Else If x > 10: Output "Small" Any x larger than 20 Any x from 10 to 40 Any x smaller than 40 Any x from 21 to 40 Question 35 1.25 pts What is the ending value of numitems if myChar = 'X'? switch (myChar) { case 'W': numItems = 1; case 'X': numItems = 2; case 'Y': numItems = 3; case 'Z': numItems = 4; } 03 O2 9 04 Question 34 1.25 pts What does this code do? If x less than y Put x to output Else Put y to output Outputs the lesser of the two integers; if they are equal, outputs nothing O Outputs the lesser of the two integers; if they are equal, outputs that integer Outputs the greater of the two integers; if they are equal, outputs nothing Outputs the greater of the two integers; if they are equal, outputs that integer Given string str1 and string str2, which expression is true? stri = "Hi"; str2 = "Hello"; str1 str2 (Comparison not possible) Question 33 1.25 pts If the input sets int x with 5 and int y with 7, what is the ending value of z? z is declared as a boolean. 2 = (x > y); True Error: No value assigned to z due to a runtime error False Error: No value assigned to z due to a syntax error Given user Str = "Doghouse", what is the ending value of char x? x = tolower(userstr.at(2)); Og Error: Compiler complains about converting an already-lowercase letter (Space) Question 31 1.25 pts Which value of x results in short circuit evaluation, causing y = 7) && {y 0/year > 100 / year > 200 year > 0 / year > 99 / year > 199 year > x; if (x 0/year > 100 / year > 200 year > 0/year > 99 / year > 199 year ly / x); 0.0 2.0 3.0 0 2.4 Question 21 1.25 pts Which statement causes overflow? int x = 3000; int y = 1000: int z; Oz-x*y*y; Oz-x*y; O z = (xx) + (y): O z = (**) + (x + y) + (x*y)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!