Page 1 of 1

PLEASE ANSWER ALL 2. 3. 4. 5. 6.

Posted: Tue Jul 12, 2022 8:17 am
by answerhappygod
PLEASE ANSWER ALL
Please Answer All 2 3 4 5 6 1
Please Answer All 2 3 4 5 6 1 (31.72 KiB) Viewed 26 times
2.
Please Answer All 2 3 4 5 6 2
Please Answer All 2 3 4 5 6 2 (25.29 KiB) Viewed 26 times
3.
Please Answer All 2 3 4 5 6 3
Please Answer All 2 3 4 5 6 3 (20.8 KiB) Viewed 26 times
4.
Please Answer All 2 3 4 5 6 4
Please Answer All 2 3 4 5 6 4 (22.23 KiB) Viewed 26 times
5.
Please Answer All 2 3 4 5 6 5
Please Answer All 2 3 4 5 6 5 (30.64 KiB) Viewed 26 times
6.
Please Answer All 2 3 4 5 6 6
Please Answer All 2 3 4 5 6 6 (24.04 KiB) Viewed 26 times
Consider the following code snippet: for (int i = 0; i <10; ) { cout << "hello"; i=i+9; } What does this code snippet display? hello hello hello hello hello hello "hello"
Consider the following code snippet: int x = -1; if(true) 0 return; x = 0; cout << x << endl; What will be displayed? X else nothing
Which of the following statement is false? switch is a selection statement. while is an iteration statement. return is a selection statement. break is a jump statement.
Which of the following two statements are infinite loops? for(int i = 0; i > 10; i++) { } while(true) {} do[] while(false); for(int i = 0; i<10; i--) { }
Consider the code segment below. What will be the value of sum? int sum = 0, z; // z is assigned a value by some statement before the // while loop and that the while loop is entered. while(z >= 0) { } zero sum +=z; infinity either zero or infinity some finite value
Consider the code snippet below: char stamp; int value; switch (stamp) { case 'A': value = 100; break; case '@': value = 50; break; case 'h': value = 120; break; default: value = 0; } For what value of stamp such that value is 120?