How? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How?

What is the output of the following? #include<iostream> Int main(){ Cout<<10%100; Return 0; }

2nd Feb 2019, 2:23 PM
Kunika Satija
Kunika Satija - avatar
2 Answers
+ 1
It should output 10 when you convert Int, Cout and Return to lowercase and use std::cout. %(modulo) returns the remainder of a division, here 10 = 100 * 0 + 10 where 0 is the quotient, 100 divisor and 10 remainder.
2nd Feb 2019, 2:43 PM
Random
Random - avatar
+ 1
The answer is smaller value in these type of cases
2nd Feb 2019, 6:34 PM
Mr Robot
Mr Robot - avatar