Quiz - 6 on Relational & Logical Operators

Quiz
•
Computers
•
12th Grade
•
Easy
Michael Kona
Used 7+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the comparison operator for 'equal to' in C?
==
!=
<>
===
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the logical AND operator in C?
&&
&
&|
||
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the logical OR operator in C?
&
||
&&
!
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the logical NOT operator in C?
-
NOT
!
~
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you combine logical AND and OR operators in C?
Use AND for & and OR for |
Use && for AND and || for OR
Use AND for && and OR for ||
Use & for AND and | for OR
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the order of precedence for operators in C?
Logical AND || > Logical OR &&
Multiplication / > Division *
Parentheses () > Postfix increment and decrement ++ -- > Prefix increment and decrement ++ -- > Unary plus and minus + - > Logical NOT ! > Bitwise NOT ~ > Multiplication * > Division / > Modulus % > Addition + > Subtraction - > Left shift << > Right shift >> > Less than < > Less than or equal to <= > Greater than > > Greater than or equal to >= > Equal to == > Not equal to != > Bitwise AND & > Bitwise XOR ^ > Bitwise OR | > Logical AND && > Logical OR || > Conditional ?: > Assignment = += -= *= /= %= &= ^= |= <<= >>= > Comma ,
Bitwise OR & > Bitwise XOR ^
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Give an example of using a relational operator in C.
if (x == y) { // do something }
while (x != y) { // do something }
switch (x < y) { // do something }
for (x > y) { // do something }
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Bitwise Operators in C Language

Quiz
•
12th Grade
10 questions
Bitwise Operators in C Language

Quiz
•
12th Grade
10 questions
KEIRO PROGRAMMING

Quiz
•
4th - 12th Grade
8 questions
Introduction to DAX in Power BI Quiz

Quiz
•
12th Grade
11 questions
A Level CS - Bitwise Manipulation and Masks Quiz - CnD video

Quiz
•
12th Grade
15 questions
Chapter 8 - Programming (IGCSE Computer Science)

Quiz
•
9th - 12th Grade
15 questions
Class 12 Skill Competition 2023-24

Quiz
•
12th Grade
14 questions
Understanding Python Identifiers and Operators

Quiz
•
11th Grade - University
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