C Operators Flashcards

(59 cards)

1
Q

What is the C type cast operator

A

An operator that converts the type of a value to another specified data type

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

What is the C sizeof operator

A

An operator that returns the size of a data type or value in bytes

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

What is the return type of the C sizeof operator

A

size_t

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

C Operator: (type)

A

Type cast operator

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

C Operator: =

A

Assignment operator

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

C Operator: >

A

Greater than

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

C Operator: >=

A

Greater than or equal to

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

C Operator: %

A

Modulos operator

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

C Operator: &

A

Address of operator and bitwise AND operator

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

What is the operator in the C compound assignment operator

A

Any one of the arithmetic operators

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

C Operator: ==

A

Equals to

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

C Operator: <

A

Less than

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

C Operator: <=

A

Less than or equal to

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

C Operator: !=

A

Not equal to

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

What are C binary operators

A

Operators that have two operands

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

C Operator: +

A

Addition operator

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

C Operator: *

A

Multiplication Operator

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

C Operator: /

A

Division Operator

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

C Operator: -

A

Subtraction operator

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

C Operator: ++

A

Increment operator

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

C Operator: –

A

Decrement operator

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

What does the prefix form of the C increment and decrement operator do

A

Alters its operands contents by 1 first, before the value is used in an expression

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

What does the postfix form of the C increment and decrement operator do

A

Alters its operands contents by 1 after it has been used in an expression

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

What does the C increment operator do

A

Adds 1 to its operand

25
What does the C decrement operator do
Subtracts 1 from its operand
26
What is the C compound assignment operator
An assignment operator mixed with an arithmetic operator which alters the variables contents by using its old value in an expression and assigning the new value to the same variable
27
C Operator: +=
Compound addition assignment operator
28
C Operator: -=
Compound subtraction assignment operator
29
C Operator: /=
Compound division assignment operator
30
C Operator: *=
Compound Multiplication assignment operator
31
C Operator: %=
Compound modulus assigment operator
32
C Operator: &&
Logical AND operator
33
C Operator: ||
Logical OR operator
34
C Operator: !
Logical NOT operator
35
What does the C logical AND operator do
Takes two boolean expressions as its operands and if both are true, the final evaluation is true. if one or both expressions is false, then the final evaluation is false
36
What are C logical operators
Binary operators that take two boolean expressions as its operands and uses the evaluation of the expressions to create another expression which it evaluates as its final result
37
What does the C logical OR operator do
Takes two boolean expressions as its operands and if one or both expressions are true, then the final evaluation is true. if both expressions are false, then the final evaluation is false
38
What does the C logical NOT operator do
Takes a boolean value or expression as its operand and reverses it, so true becomes false and false becomes true
39
What is the second operand when using the C conditional operator
The value for the entire conditional expression if the condition is true
40
What is the third operand when using the C conditional operator
The value for the entire conditional expression if the condition is false
41
Where is the C cast operator placed
To the left of the variable whose type you want to convert
42
What is the C conditional operator
An operator that takes three operands. one logical statement to the left and two expressions to the right. if the logical expression is true, the value that is evaluated is the first expression. if the logical expression is false, the value that is evaluated is the second expression
43
What is the first operand when using the C conditional operator
A condition
44
What C data types do binary operators only operate on
Integer types
45
How is the C cast operator used
By placing the data type you want to cast the value to in parenthesis in front of the variable
46
C Operator: <<
Bitwise shift left operator
47
C Operator: |
Bitwise OR operator
48
C Operator: >>
Bitwise shift right operator
49
What does the C bitwise AND operator do
Combines the corresponding bits of its operands in such a way that if both bits are 1, the resulting bit is 1; otherwise the resulting bit is 0
50
What are C bitwise operators
Operators that operates on bits in integer values
51
C Operator: ^
Bitwise exclusive OR (XOR) operator
52
What does the C bitwise NOT operator do
Reverses the bits of the operand, so 1 becomes 0 and 0 becomes 1
53
C Operator: ?
Conditional operator
54
What does the C bitwise XOR operator do
Produces a 1 if both bits are different, and 0 if they are the same
55
What does the C bitwise OR operator do
Produces a 1 if either or both of the corresponding bits are 1 otherwise the result is 0
56
C Operator: ~
Bitwise NOT operator
57
What do the C bitwise shift operators do
Shift the bits in the left operand by the number of positions specified by the right operand.
58
What does the C address of operator do
Produces the address in memory of its operand
59
What is operator precedence
A set of rules determines the sequence in which operators in an expression are executed