C Data Types 2 Questions and Answers

Practice Mode
Showing 10 of 159 questions
Q31
Typedef is used to
  • A Create a newe type
  • B Create a new name
  • C Gives power to datatype
  • D None of these
Answer: Option B
Q32
Find the output void main ( ) { printf ("%d", sizeof (5, 3)); }
  • A 2
  • B 4
  • C 8
  • D Suffering
Answer: Option C
Q33
Which is most appropriate declaration of a floating point number ?
  • A float x=1.5
  • B float y=1.5f
  • C double z=1.5
  • D Both b and c
Answer: Option D
Q34
Which of the following creates a sequence set of integral constants ?
  • A integer array
  • B enum
  • C structure
  • D None of these
Answer: Option B
Q35
The smallest signed 8-bit number is
  • A -128
  • B -256
  • C -127
  • D 0
Answer: Option A
Q36
Choose the correct statement for unsigned char
  • A The sign bit acts as a data bit.
  • B the sign bit not acts as a data bit.
  • C The sign bit is always 0
  • D The sign bit is always 1
Answer: Option A
Q37
'void' is an empty data type associated with
  • A All aggregate types
  • B All data types
  • C All functions and pointers
  • D All the above
Answer: Option D
Q38
Which of the following is a valid hexadecimal integer constant ?
  • A -0xa
  • B 0x5.2
  • C 0x1F
  • D All the above
Answer: Option A
Q39
The rang eof enum data type
  • A 0 to (INT_MAX) -1
  • B 0 TO (INT_MAX) +1
  • C 0 TO UNIT-MAX
  • D INT_MIN-INT_MAX
Answer: Option D
Q40
A character constant is
  • A 1 byte long
  • B 2 bytes long
  • C System dependent
  • D None of these
Answer: Option C
Questions and Answers for Competitive Exams Various Entrance Test