Quiz - 4 on Increment & decrement operators in C

Quiz
•
Computers
•
12th Grade
•
Medium
Michael Kona
Used 5+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Control Structures

Quiz
•
12th Grade
15 questions
Python Basics Quiz 1

Quiz
•
8th Grade - University
15 questions
Basic Python Coding

Quiz
•
11th - 12th Grade
12 questions
Java Strings

Quiz
•
9th - 12th Grade
20 questions
Grade 7 Python Programming Quiz

Quiz
•
7th Grade - University
11 questions
Introduction to computer programming

Quiz
•
12th Grade
16 questions
Python basics

Quiz
•
9th - 12th Grade
10 questions
Java Print Statements Warm-Up

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade