+ 4

A question

#include <iostream> using namespace std; int main() { for(char c=0;c<256;c++){ } return 0; } Why the output is infinite?

27th Apr 2018, 10:58 PM
Yusuf
Yusuf - avatar
5 Answers
+ 7
Because the valid character values are -128 to 127 so it will never get there.
27th Apr 2018, 11:00 PM
John Wells
John Wells - avatar
+ 5
I don't know that. Thank you.
27th Apr 2018, 11:01 PM
Yusuf
Yusuf - avatar
+ 5
I'm using http://kotlinlang.org/docs/tutorials/ but it isn't for beginners. I haven't found a decent one for beginners.
27th Apr 2018, 11:10 PM
John Wells
John Wells - avatar
+ 4
Thank you. Since I know programming, I think it won't be a problem.
27th Apr 2018, 11:11 PM
Yusuf
Yusuf - avatar
+ 3
By the way, which resource do you advice to learn Kotlin?
27th Apr 2018, 11:05 PM
Yusuf
Yusuf - avatar