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
Von Neumann Architecture

Quiz
•
8th Grade - University
15 questions
1.1.1a – The CPU & Registers

Quiz
•
12th Grade
10 questions
Post-Test Operator (Pemrograman Web Server-Side PHP)

Quiz
•
9th - 12th Grade
10 questions
Arduino programming

Quiz
•
12th Grade
11 questions
CodeHS 2.13 Short-Circuit Evaluation

Quiz
•
9th - 12th Grade
12 questions
ulangan informatika kelas X

Quiz
•
12th Grade - University
14 questions
Memory Management Quiz

Quiz
•
12th Grade
13 questions
cambridge nationals ict

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

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade