Math operators and logic Flashcards

1
Q

How can we check integer ranges?

A

using the limits.h and the float.h libraries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do we make something equal in C

A

using ‘==’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does ++ and – do

A

increment/decrement operator that changes the integer value by 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is & used for

A

-ampisand
-performs the AND operation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is && used for

A

performs a logical comparison and order of operation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does (|) do?

A

OR operation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Given:
x = 1, y=2, z=3
What will the output be
of
z< y && x>z = false

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Given x = 2, y =5 ,z = 1
What will the output be for
z<y &&( x>z || y<z) = false

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does &laquo_space; or &raquo_space; do

A

Shifts the the binary number to the left or right

How well did you know this?
1
Not at all
2
3
4
5
Perfectly