
Increment/Decrement
Authored by Umit Akdag
Education
9th - 12th Grade
Used 8+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int x=1, y = 2;
y = x++ ;
cout << x <<" "<< y ;
3 1
1 2
2 1
1 3
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int y, x=2;
y = ++x;
cout << x <<" "<< y ;
1 2
2 1
2 2
3 3
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int x = 2;
int y=4;
cout << x++ <<" "<< --y;
1 2
2 3
2 4
2 1
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int x= 2;
int y = 2 * x++;
cout << x <<" "<< y;
3 4
3 3
4 3
4 4
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int x= 99;
if (x++ < 100)
cout << "It is true!\n";
else
cout << "It is false!\n";
It is false!
It is true!
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int x=0;
if (++x)
cout << "It is true!\n";
else
cout << "It is false!\n";
It is true!
It is false!
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?