Govt. Exams
Entrance Exams
string is not a fundamental data type in C. Fundamental types are int, float, double, char, and void. Strings are arrays of characters.
Both a and b are integers, so integer division is performed: 5/2 = 2 (remainder discarded).
Age is an integer value. Using 'int' is appropriate and memory-efficient. Floating-point types are unnecessary for this discrete value.
Signed char ranges from -128 to 127, while unsigned char ranges from 0 to 255. Both use 1 byte but interpret the bits differently.
The 'char' data type occupies 1 byte (8 bits) of memory on virtually all modern C systems, as per the C standard.
Implicit conversion truncates decimal part. int x = 3.7; results in x=3 with no error.
Signed char uses 8 bits with one bit for sign, giving range -128 to 127 (2^7 to 2^7-1).
On most 32-bit systems, float occupies 4 bytes (32 bits) of memory according to IEEE 754 standard.
Initialization assigns a value when the variable is declared (int x = 5;). Assignment changes the value later (x = 10;).
The storage classes in C are: auto, register, static, and extern. 'static' is one of them.