Popular Google Pages:
◕ Send your story to RiyaButu.com and get ₹ 500/- Details..
◕ Bengali Story writing competition. Details..
◕ This article is regarding Signed char and Unsigned char in C++.
Last updated on: 25th December 2016.
◕ What is Signed char and Unsigned char in C++?
- We know integer has the property Signed and Unsigned.
But, character is not Signed or Unsigned by default.
It depends on the Implementation or on the C++ Compiler Developer.
It depends on me whether I want to use character as Signed or Unsigned.
The example codes are given bellow:
▨ char bud; // may be signed, may be unsigned
▨ unsigned char flower; // definitely unsigned
▨ signed char bird; // definitely signed
If we use the char as numeric type then
- the signed char type typically represents from the range -128 to 127.
- the unsigned char type typically represents the range 0 to 255.
This means if we want to use a char as variable to hold values as large as 200.
Then we have to use unsigned char for its successful use on any system.
Integer Type in C++
Rules for Variable Names
Variable in C++
Fundamental Data Types & Compound Data Types
What is called Directive and Header File in C++ ?
What is Block Statement in C++ ?
Top of the page