Hi
I understand the declaration "unsigned int" - it simply means that you are going to use only +ve integers starting from 0. But I don't understand what this "unsigned char" declaration is. Let's try to understand with some simple code.
Here is ASCII table. Normal ASCII runs from 0 to 127 (decimal) and the extended from 0 to 255.
Could you please help me with it? Thanks a lot.
Example for Unsigned:
Code:#include <iostream>
using namespace std;
int main()
{
unsigned char a = 100;
unsigned char b = a + 59;
cout << "enter a = ";
cin >> a;
cout << b << endl;
system("pause");
}
Example for signed:
Code:#include <iostream>
using namespace std;
int main()
{
char a = 100;
char b = a + 59;
cout << "enter a = ";
cin >> a;
cout << b << endl;
system("pause");
}