Quiz - 6 on Relational & Logical Operators

Quiz - 6 on Relational & Logical Operators

12th Grade

10 Qs

quiz-placeholder

Similar activities

Programming Languages

Programming Languages

9th - 12th Grade

12 Qs

Quiz - 7 on Bitwise Operators in C

Quiz - 7 on Bitwise Operators in C

12th Grade

15 Qs

Law , Artificial Intelligence & Screen Time

Law , Artificial Intelligence & Screen Time

7th - 12th Grade

12 Qs

Java Data Types Quiz

Java Data Types Quiz

12th Grade

15 Qs

Python

Python

12th Grade

10 Qs

Lesson 10 - MOS EXCEL

Lesson 10 - MOS EXCEL

12th Grade

12 Qs

comp 12

comp 12

12th Grade

11 Qs

Demorgan's Theorem

Demorgan's Theorem

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?