
Quiz - 5 on Increment and Decrement Operators
Authored by Michael Kona
others
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of x after the following code is executed?
int x = 5;
x++;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of y after the following code is executed?
int y = 10;
y--;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of z after the following code is executed?
int z = 3;
int a = z++;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the final value of b in the following code? int a = 5; int b = ++a;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? int x = 2; int y = x++ + 5; printf("%d", y);
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following code? int a = 4; int b = --a + 3;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
After executing the following code, what is the value of c? int a = 7; int b = a--; int c = b + a;
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?