Quiz - 6 on Relational & Logical Operators

Quiz - 6 on Relational & Logical Operators

12th Grade

10 Qs

quiz-placeholder

Similar activities

Python Fundamentals

Python Fundamentals

11th - 12th Grade

12 Qs

Mastering Bitwise Operations and Shifts

Mastering Bitwise Operations and Shifts

7th Grade - University

8 Qs

J277 - 1.1 - Architecture of the CPU

J277 - 1.1 - Architecture of the CPU

10th Grade - University

15 Qs

Bitwise Operators Quiz

Bitwise Operators Quiz

12th Grade

13 Qs

Quiz - 9 on if-else

Quiz - 9 on if-else

12th Grade

15 Qs

CodeHS 2.8 Comparison Operators

CodeHS 2.8 Comparison Operators

9th - 12th Grade

13 Qs

Basic operator & Maths/Comparisons & assignment

Basic operator & Maths/Comparisons & assignment

6th - 12th Grade

10 Qs

L. 4. Introduction to Hypertext Pre-Processor - 5

L. 4. Introduction to Hypertext Pre-Processor - 5

12th Grade

10 Qs

Quiz - 6 on Relational & Logical Operators

Quiz - 6 on Relational & Logical Operators

Assessment

Quiz

Computers

12th Grade

Easy

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?