Recall & Review
beginner
What are arithmetic operators in C?
Arithmetic operators are symbols used to perform basic math operations like addition (+), subtraction (-), multiplication (*), division (/), and modulus (%).
Click to reveal answer
beginner
What does the modulus operator (%) do in C?
The modulus operator (%) gives the remainder after dividing one number by another. For example, 7 % 3 equals 1 because 7 divided by 3 leaves a remainder of 1.
Click to reveal answer
intermediate
How does integer division behave in C when using the division operator (/)?
When dividing two integers, C performs integer division, which means it divides and then drops any decimal part, returning only the whole number part.
Click to reveal answer
beginner
What is the result of the expression: 5 + 3 * 2 in C?
The result is 11 because multiplication (*) has higher priority than addition (+). So, 3 * 2 = 6, then 5 + 6 = 11.
Click to reveal answer
beginner
Can arithmetic operators be used with floating-point numbers in C?
Yes, arithmetic operators like +, -, *, and / can be used with floating-point numbers (like float or double) to perform math with decimals.
Click to reveal answer
What is the output of the expression 10 / 4 in C when both numbers are integers?
✗ Incorrect
Integer division drops the decimal part, so 10 / 4 equals 2.
Which operator gives the remainder of a division in C?
✗ Incorrect
The modulus operator (%) returns the remainder after division.
What is the result of 8 + 2 * 5 in C?
✗ Incorrect
Multiplication happens first: 2 * 5 = 10, then 8 + 10 = 18.
Which operator is used for multiplication in C?
✗ Incorrect
The asterisk (*) is the multiplication operator.
Can you use arithmetic operators with float variables in C?
✗ Incorrect
Arithmetic operators +, -, *, and / work with float and double types.
Explain how the division operator (/) works differently with integers and floating-point numbers in C.
Think about dividing 7 by 2 as int and float.
You got /3 concepts.
Describe the order of operations when using multiple arithmetic operators in a single expression in C.
Remember PEMDAS or operator precedence.
You got /3 concepts.