What is the minimum value of char type?
My question is
What is the minimum value of char type. Select the one correct answer.
a. 0
b. -215
c. -28
d. -215-1
Advance Thanks,
R.Rengaraj
{Java Certification Quiz}
{On this forum my 19th Question.}
Member • Dec 4, 2009
char: The char data type is a single 16-bit Unicode character. It has a minimum value of '\u0000' (or 0) and a maximum value of '\uffff' (or 65,535 inclusive).
Member • Dec 4, 2009
Member • Dec 5, 2009
Member • Dec 9, 2009
Member • Dec 9, 2009
Member • Dec 9, 2009
R.Rengarajmahesh_dahaleWhat is the minimum value of char type. Select the one correct answer.
a. 0
b. -215
c. -28
d. -215-1
Member • Dec 9, 2009
R.Rengarajpradeep_agrawalIn C a variable of type char can also hold a -ve value and the range is from -128 to 127. So the min. value taht a char variable can have in C is -128.
If someone want that char variable hold only positive values in C then he/she need to use "unsigned char" instead of "char" while declaring the variable.
-Pradeep