C Data Types 2 Questions and Answers
C Data Types 2
Showing 10 of
159 questions
1. Find the output
void main ( )
{
int x=256;
char ch=x;
printf {%d", ch};
}
- -128
- 256
- 255
- 0
2. The size of an integer variable depends upon
- width of address bus
- width of data bus
- width of control bus
- width of system bus
3. Integers are stored internally in
- Decimal
- Hexadecimal
- Octal
- Fixed no. of binary digits
4. Which of the following is a correct declaration?
- int age
- short age;
- long age;
- All the above
5. Find the output
void main ( )
[
printf (%d%d", 4.5, 5};
}
- 4 5
- 0 0
- 0 5
- None of these
6. Which modifier almost doubles the largest value of an integer ?
- signed
- unsigned
- short
- long
7. Find the output
void main ( )
enum {x=32767,y};
printf (% %d", x, y);
}
- 32767 32768
- 32767 -32767
- 32767 0
- Compilation error
8. In 'C', types are partitioned in to
- Data types
- Data types, function types, incomplete types
- Data types, function types, incomplete types
- None of the above.
9. Macros like INT_MIN, INT_MAX are defined in which header file.
- stdio.h
- limits.h
- dos.h
- None of these
10. Which data type behaves like both integer type and character type ?
- short int
- signed int
- char
- enum