+ 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 Antworten
+ 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
Saad Saleem
Saad Saleem - avatar