1/7
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What are the basic arithmetic operators in C?
+ (addition), - (subtraction), * (multiplication), / (division), % (modulus).
What is the difference of 5 - 3 in C?What is the sum of 5 + 3 in C?
8
What is the difference of 5 - 3 in C?
2
What is the product of 5 * 3 in C?
15
What is the quotient of 5 / 3 in C?
1
What is the remainder of 5 % 3 in C?
2
Why does 5 / 3 return 1 instead of 1.67 in C?
Because both 5 and 3 are integers, and integer division in C truncates the decimal part.
What will happen if we change int a = 5, b = 3; to float a = 5, b = 3; and use /?
The division will return 1.666667 because floating-point division preserves decimals.