- A4 Bytes
- B8 Bytes
- C2 Bytes
- DDepends on the system/compiler
The size of an int data type in a 32-bit system is 2 Bytes
Output:
-56
Output
not equal
0.1 by default is of type double which has different representation than float resulting in inequality even after conversion.
char has lesser bytes than int and int has lesser bytes than double in any system
Option C is correct with respect to the size of the datatypes in the C programming language. The char data type typically has a size of 1 byte, the int data type typically has a size of 4 bytes, and the double data type typically has a size of 8 bytes. Therefore, char < int < double in terms of size. However, it's worth noting that the size of these data types can vary depending on the specific implementation and architecture of the system being used.
In C language, data types can be arranged based on their size in bytes. Here's a common arrangement from smallest to largest:
Please note that the actual size of these data types might vary depending on the compiler and system architecture.
Output:
4
Since the size of a union is the size of its maximum datatype, here int is the largest hence 4.
Since the size of the structure depends on its fields, it has a variable size.
All are not modifier. Also register is not a modifier.
Output of Turbo C++ 3.0: 10 65526 0 0
10 65526 0 0
Turbo C ++4.5: 10 65526 0 0
10 65526 0 0
Linux GCC: 10 4294967286 0 0
10 4294967286 0 0
Visual C++: 10 4294967286 0 0
10 4294967286 0 0
a=(signed)10u;
signed value of 10u is +10
so, a=10
b=(unsigned)-10;
unsigned value of -10 is :
MAX_VALUE_OF_UNSIGNED_INT – 10 + 1
In turbo c 3.0 complier max value of unsigned int is 65535
So, b = 65526
y = (signed)10u + (unsigned)-10;
= 10 + 65526 = 65536 = 0 (Since 65536 is beyond the range of unsigned int. zero is its corresponding cyclic vlaue)
X = y = 0
We cannot predict the value of volatile variable because its value can be changed by any microprocessor interrupt.