C Data Types 2 Questions and Answers

Practice Mode
Showing 10 of 159 questions
Q1
Find the output void main ( ) { int x=256; char ch=x; printf {%d", ch}; }
  • A -128
  • B 256
  • C 255
  • D 0
Answer: Option D
Q2
The size of an integer variable depends upon
  • A width of address bus
  • B width of data bus
  • C width of control bus
  • D width of system bus
Answer: Option B
Q3
Integers are stored internally in
  • A Decimal
  • B Hexadecimal
  • C Octal
  • D Fixed no. of binary digits
Answer: Option D
Q4
Which of the following is a correct declaration?
  • A int age
  • B short age;
  • C long age;
  • D All the above
Answer: Option D
Q5
Find the output void main ( ) [ printf (%d%d", 4.5, 5}; }
  • A 4 5
  • B 0 0
  • C 0 5
  • D None of these
Answer: Option B
Q6
Which modifier almost doubles the largest value of an integer ?
  • A signed
  • B unsigned
  • C short
  • D long
Answer: Option B
Q7
Find the output void main ( ) enum {x=32767,y}; printf (% %d", x, y); }
  • A 32767 32768
  • B 32767 -32767
  • C 32767 0
  • D Compilation error
Answer: Option D
Q8
In 'C', types are partitioned in to
  • A Data types
  • B Data types, function types, incomplete types
  • C Data types, function types, incomplete types
  • D None of the above.
Answer: Option C
Q9
Macros like INT_MIN, INT_MAX are defined in which header file.
  • A stdio.h
  • B limits.h
  • C dos.h
  • D None of these
Answer: Option B
Q10
Which data type behaves like both integer type and character type ?
  • A short int
  • B signed int
  • C char
  • D enum
Answer: Option C
Questions and Answers for Competitive Exams Various Entrance Test