Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please can anyone do this questions? Evaluate the following expression: (x > 25)

ID: 3548531 • Letter: P

Question

Please can anyone do this questions?

Evaluate the following expression: (x > 25), where x (data-type int) has the value 25 Evaluate the following expressions, assume a=3, b=4, c=6. a == b || b > 2 True or False. True False Rewrite the following conditional expressions as if/else statements: cout « (((num % 2 ) == 0) ? "Even " : "Odd "); The last legal subscript that can be used with the array declared as:(see image below) is Evaluate the following expressions, assume int a=3, b=4, c=6; 1 != -b || c != 3; True or False. True False Evaluating Sorts Given the following array: 40,12, 5, 8, 3, 45,10 Show what the array looks like after the first swap of a Bubble Sort in ascending order. Two functions with the same name but different parameters types are..What is the output from the following code segment? If there is no output, a runtime error, compile error or an infinite loop, please identify and explain. Write a code segment that prompts the user to enter the number of a month (1 - 12). If the input is invalid, print an error message and loop until the input is valid.

Explanation / Answer

Question 10:

False


Question 11:

True because the second condition of the if(b > 2) is true.


Question 12:

if(num % 2 == 0) cout << "Even ";

else cout << "Odd ";


Question 13:

4


Question 14:

True because both the conditions of the if statement are true.


Question 15:

12 5 8 3 40 10 4


Question 16:

overloaded functions.


Question 17:

Output is:

1

3

5

7

.

.

.


infinite loop.

Reason. Steps of the program execution are given below :

Initially, the value of x = 1, the condition of while loop is true and thus, x is printed and its value is increased by 2. thus, new x = 1 + 2 = 3.

Again, the condition of while loop is true and thus, x is printed and again its value is increased by 2. Thus, new value is 3 + 2 = 5.

similarly, the value of x is increased by 2 everytime the control enters the loop, and the value of x keeps on increasing and never becomes 12(since x is only taking odd values)

So, the loop becomes infinite.


Question 18:

int month;

do{

cout << "Enter the month name: ";

cin >> month;

}while(month >= 1 && month <= 12);