Search Header Logo

Quiz - 4 on Increment & decrement operators in C

Authored by Michael Kona

Computers

12th Grade

Used 16+ times

Quiz - 4 on Increment & decrement operators in C
AI

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 result of the expression '++x' if x is initially 5?

7

6

4

10

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of x after the expression 'x++' if x is initially 3?

3

5

2

4

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If y is 8, what will be the value of y after 'y--' is executed?

5

9

7

6

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of 'printf("%d", ++x);' if x is initially 7?

7

6

9

8

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If z is 10, what will be the output of 'printf("%d", z--);'?

11

9

10

0

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the value of a after 'a = ++b + c--;' if b is 4 and c is 6?

9

12

10

11

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of 'printf("%d", x++ + ++x);' if x is initially 2?

7

5

10

Undefined behavior

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?