+ 1

Take a unsigned integer variable and assign it - 1 and take signed integer variable and assign it - 1

When you compare both they both are equal

8th Aug 2017, 4:37 AM
Mohit Rawat
Mohit Rawat - avatar
2 Answers
+ 6
Try and tell me if they are same- #include <iostream> using namespace std; int main() { unsigned int x= -1; int y = -1; cout<<x<<" "<<y; return 0; }
8th Aug 2017, 5:23 AM
Sachin Artani
Sachin Artani - avatar
+ 3
I didn't ask that, i know they both are different but when you try to compare them compiler shows they are equal https://code.sololearn.com/c0kfhkcjUgIg/?ref=app
11th Aug 2017, 5:03 AM
Mohit Rawat
Mohit Rawat - avatar