How is this code giving the correct answer? I though unsigned short int is only positive numbers. I am giving it a -3 and I am getting 0 for sum.
thanks
thanks
Code:
#include <iostream>
using namespace std;
typedef unsigned short int Ushort;
int main()
{
Ushort x = -3;
Ushort y = 3;
Ushort sum = x+y;
cout << sum << endl;
cin.get();
return 0;
}
Comment