answersLogoWhite

0

Consult your limits.h and math.h.

For char it will be -128..127 or 0.255 (signed and unsigned).

User Avatar

Jody Fay

Lvl 10
2y ago

What else can I help you with?

Related Questions

What is the range of integer char float for a 16-bit computer?

Consult your limits.h and math.h. For char it will be -128..127 or 0.255 (signed and unsigned).


Write a function prototype named test that accepts two parameters an integer and character and returns a float?

float test(int, char);


Can we assign int and float values to the character data type in c language?

Yes, but this will result in an implicit conversion and possible narrowing. A char is always at least 8-bits in length, but an int may be 4 bytes in length (the actual length is implementation-defined) thus assigning an integer value outwith the range of a char will result in narrowing. Similarly when assigning a float (typically 16-bits in length); the fractional component will be lost and the integer value may be narrowed. An unsigned char is only guaranteed to hold values in the range 0 through 255 and a signed char is only guaranteed to hold values in the range -127 through +127. Any values outwith those integer ranges may result in narrowing. Most modern architectures support twos-complement notation thus the signed range becomes -128 through +127, however this cannot be guaranteed across all implementations. Also, a "plain" char may be signed or unsigned depending on the implementation but is a distinct type from an explicitly signed or unsigned char. A plain char is only guaranteed to hold positive integer values in the range 0 through 127 across all implementations.


What does a char store?

In JavaA char in Java is a 16-bit integer, which maps to a subset of Unicode.In C A char in C is an 8-bit integer, which maps to standard ASCII.Note that in both Java and in C you can use a char value like a normal integer type: char c = 48;


What is the significance of declaring a constant unsigned integer?

What is the significance of declaring a constant unsigned integer?


How many bytes does float double long string and char store?

float usually 4 double usually 8 long is 8 but integer, unlike double string is a pointer to a memory address containing array of chars, so it doesn't have a fixed size and a char is usually 1, but i think its 2 in java


How many bytes is an integer variable?

It depends on the context. Each database and computer language define an "integer". In the C language an integer is defined by the hardware. It can vary from 2 to 8 bytes or more.


Address of a float can be assigned to a char?

No. The address of a float can only be assigned to a variable of type pointer to float. Any other (coerced) use is outside of the definition, implementation, and portability of the language.Yes, with typecast, but it is entirely pointless:float f;char c = (char)&f;


How many bytes required for int float double char boolean?

Int: 4 bytes Float: 4 double: 8 char: 1 boolean: 1


What is the maximum value you can store in an integer a float and a character variable?

There is no definitive answer as the low-level aspects of storage are implementation-defined. The only guarantee provided by the standard is that a character variable (char) must be at least 8-bits in length, but nothing is said about its sign. As such, the maximum value you can guarantee across all implementations is 127. An integer (int) is guaranteed to be at least as long as a character. However, every implementation provides limits.h which defines the valid range for all integers, including a definition for the number of bits in a char. The valid range of floating point values is provided by float.h.


Is The controlling expression for a switch statement can be a char?

char is actually integer, even so they are represented with letters. Anyway, yes you can use the controlling expression of type char in switch statements.


Mention different types available in C?

Char, int, float and double.