Math operators and logic Flashcards
1
Q
How can we check integer ranges?
A
using the limits.h and the float.h libraries
2
Q
How do we make something equal in C
A
using ‘==’
3
Q
What does ++ and – do
A
increment/decrement operator that changes the integer value by 1
4
Q
What is & used for
A
-ampisand
-performs the AND operation
5
Q
What is && used for
A
performs a logical comparison and order of operation
6
Q
What does (|) do?
A
OR operation
7
Q
Given:
x = 1, y=2, z=3
What will the output be
of
z< y && x>z = false
A
True
8
Q
Given x = 2, y =5 ,z = 1
What will the output be for
z<y &&( x>z || y<z) = false
A
True
9
Q
What does «_space; or »_space; do
A
Shifts the the binary number to the left or right