0
Why the answer is "Solo"?
#include <iostream> using namespace std; int main() { int i = 65; char j = 'A'; if(i == j) { cout << "Solo"; } else { cout << "Learn"; } }
3 Answers
+ 14
When you try to compare any int and char, then char is converted to its ASCII Code.
The ASCII Code of A is 65, so the first condition becomes true and there you go.
+ 7
ASCII value of A=65
that means I==j true
that's why answer is solo
+ 1
Thank you