0

Why output is 5?

#include<stdio.h> int main() { int b=5; b%=7; printf("%d",b); return 0; }

30th Apr 2020, 9:08 PM
Kawser
Kawser - avatar
1 Answer
+ 4
b = 5 b %= 7 is same like b = b % 7 which is b = 5 % 7 = 5 print(b) output is 5 % is modulus which return remainder of a/b(5/7) You probably need to revise your course again especially operation operator and stuff.
30th Apr 2020, 9:17 PM
minirkk
minirkk - avatar