C Data Types 2 Questions and Answers

Practice Mode
Showing 10 of 159 questions
Q61
Find theoutput. void main ( ) { float f=3.2; double d=3.2; if (f==d) printf ("equal"); else printf ("not equal "); }
  • A equal
  • B not equal
  • C No output
  • D None of these
Answer: Option B
Q62
Find theoutput. void main ( ) { int x=0xFFFB; printf(%d", x) }
  • A 5
  • B -5
  • C 65631
  • D 32762
Answer: Option B
Q63
Find the output. void main ( ) { printf ("%d %d %d", 40000, 40. 4); }
  • A -25536 40 4
  • B -25536 0 40
  • C -25536 0 0
  • D None of these
Answer: Option B
Q64
In LINUX each memory variable's real address is
  • A 20 bits
  • B 16 bits
  • C 32 bits
  • D 24 bits
Answer: Option C
Q65
Find the output void main ( ) { char x=-49; printf ("%c", ~x); }
  • A 49
  • B 1
  • C 0
  • D None of these
Answer: Option C
Q66
Find the output extern char s="\dx'; void main ( ) { printf ("%c", s); }
  • A x
  • B d
  • C Compilation error
  • D No output
Answer: Option B
Q67
If there are 32 segments, each of size 1k bytes, then the logical address should have
  • A 13 bits
  • B 14 bits
  • C 15 bits
  • D 16 bits
Answer: Option C
Q68
Find the output char s; void main ( ) { s='a'; { static char s='b'; printf (%c", s); }
  • A b97
  • B b0
  • C b49
  • D Compilation error
Answer: Option A
Q69
Integer division results in
  • A Truncation
  • B Rounding
  • C Overflow
  • D None of these
Answer: Option A
Q70
Find the output. void main ( ) { int x=-350u; char y=-145u; printf ("%u", x+=y); }
  • A 65297
  • B 239
  • C 65041
  • D None of these
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test