Solution:-
Correct option - 9
As x is intialised to 7 and the condition is x<7 so the given condition fails and last statement x=x+2 will be executed so x = 7+2 = 9.
Question 16 What is the value of x after the following code is executed? X =...
Question 25 What is output when the following code is executed? 65 score = group if score <= 60: group group + 'A' if score <= 70: group group + 'B' if score <= 80: group group + 'C' else: group group + 'D' print(group) BC AB с D
2. What is the value of x alter the following code is executed # include<iostream> using namespace std; int main int t-0, c- 0,x-3; while (c < 4) t=t+x; cout << x return 0; a) 3 b) 21 c) 24 d) 48 3. What is the output of the following code? # include<iostream> using namespace std; int main0 int a- 3; for (int i 5; i >0; i) a a+i cout << a << “ “ return 0; d) 8...
What will be the value of w after the following section of code executes: int w = 4, 9 = 3; if (a < 5) if (w == 7) W = 3; else W = 3; else if (w > 3) W = 2; else W = 1; Select one 2.3 0 b.o 0.2 d. 1
In the code given below, how many times the cout statement is executed? for (int x = 0; x< 10; x++) for (int y=0; y < 10; y++) for (int z = 0; z <=10; z++) cout << X+y+z;
What is the value of x after the following code executes? intx=10; if(x++ >10) x=13; 0 b. 9 0 C. 13 0 0 Which of the following is not a valid identifier? O a. return O b. mylnt O c. myInteger O d. total3 If you want a loop to quit iterating if x < 10 and y > 3, what would be the proper loop condition test? O a. x < 10 && y > 3) b. (x >10...
java by the way What is the value of the variable y after the following code is executed? int x = 10; int y = 0; while (x > 0) { x = x / 2; y++; } 4 3 2 1
question is from a java quiz Based on the following code, what is the value of y if x = 5? int x, y; if (x < 4) у 2; else if (x > 4) = { if (x > 7) y = 4; else y = 6; } else y = 8; 6 8 2 O 4
What is the output of the following code: int numbers [] {99,87,66,55,101}; cout << numbers[i] « " ";
Question 9 Evaluate the integral f(x) dx where 203 f(x) = for x <1 for x > 1 6 7 4 5 3 O2 11 2
What is printed when the following code is executed? #include <stdio.h> int main() { for (int i=3, j=5; i>=0; i-=2, j+=j*i) { printf("%d", j); منم }