C Data Types 2 Questions and Answers

Practice Mode
Showing 10 of 159 questions
Q71
Find the output. void main ( ) { int x=12; int y=16; printf ("%hx %dx", x,y); }
  • A c 16x
  • B c 10
  • C c 16
  • D None of these
Answer: Option A
Q72
Find the output vid main ( ) { double d=2 . 4; printf ("%g", d); }
  • A 2.4
  • B Garbage
  • C 2.400000
  • D %g
Answer: Option A
Q73
Find the output void main ( ) { typedef int float; float x=4.7; printf ("%d", sizeof (x)); }
  • A 4
  • B 2
  • C Compilation errr
  • D None of these
Answer: Option C
Q74
The synonym for an existing data type created by typedef reserves memory of
  • A One byte
  • B Two bytes.
  • C Depends upon the data type
  • D None of these
Answer: Option C
Q75
Find the output extern int x; void main ( ) { typedef int myint; myint x; printf ("%d", x); }
  • A 0
  • B Garbage
  • C Error, multiple declaration for x
  • D None of these
Answer: Option B
Q76
Find the output void main ( ) { unsigned enum color { red='0', green=0, blue}' printf (%d %d %d", red, green, blue); }
  • A 48 49 50
  • B 48 0 1
  • C 0 0 1
  • D Compilation error
Answer: Option D
Q77
Find the output void main ( ) { char c='\ci'; printf ("%c", c); }
  • A \
  • B \c
  • C c
  • D \ci
Answer: Option C
Q78
Find the output void main ( ) { int a=b=c=10; printf("%d %d %d", a, b, c); }
  • A 10 10 10
  • B 0 0 10
  • C Garbage Garbage 10
  • D Compilation error
Answer: Option D
Q79
Real constant in C can be expressed in which off the following forms
  • A Fractional form only
  • B Exponential form only
  • C ASCII form only
  • D Both Fractional & Exponential forms
Answer: Option D
Q80
the maximum index in an int array in Turbo c 3.0 is
  • A 16383
  • B 32767
  • C Does not have any upper limit
  • D None of these
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test