Quiz - 4 on Increment & decrement operators in C

Quiz
•
Computers
•
12th Grade
•
Medium
Michael Kona
Used 14+ 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
12 questions
Quiz de Programmation en Langage C

Quiz
•
12th Grade
10 questions
POST TES MATRIKULASI

Quiz
•
10th Grade - University
10 questions
Kuis1

Quiz
•
12th Grade
10 questions
C++ Quiz 1

Quiz
•
11th - 12th Grade
20 questions
Java Kena Mental

Quiz
•
12th Grade
10 questions
4TR - CSS do 106 stranice

Quiz
•
12th Grade
15 questions
GCSE Computing: Computational Logic 2.4

Quiz
•
11th - 12th Grade
10 questions
PROGRAMACION

Quiz
•
9th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade