Quiz - 6 on Relational & Logical Operators

Quiz - 6 on Relational & Logical Operators

12th Grade

10 Qs

quiz-placeholder

Similar activities

C - Language Quiz

C - Language Quiz

12th Grade

15 Qs

Operators in python

Operators in python

12th Grade

10 Qs

Conditional Statements Quiz

Conditional Statements Quiz

12th Grade

10 Qs

SC C++  Quiz 1

SC C++ Quiz 1

7th - 12th Grade

15 Qs

A Level CS - Bitwise Manipulation and Masks Quiz - CnD video

A Level CS - Bitwise Manipulation and Masks Quiz - CnD video

12th Grade

11 Qs

Bitwise

Bitwise

12th Grade

15 Qs

Conditional operator (12-1AVI)

Conditional operator (12-1AVI)

12th Grade

9 Qs

Bitwise Operators in C Language

Bitwise Operators in C Language

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?