Single Choice
Not Set
QWhat is the output of this C code?
#include
int main()
{
int i = -5;
int k = i %4;
printf("%dn", k);
}
ID: #1153
Operators and Enums in C Language
1,709 views
Question Info
#1153Q ID
Not SetDifficulty
Operators and Enums in C LanguageTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
Option C is correct answer.
% is a remainder after integer division. The % operator is sometimes referred to as the modulus operator.
Suppose that a and b are integer variables whose values are 10 and 3.
then result will be (a % b) = 1
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic