C Data Types 2 Questions and Answers

Practice Mode
Showing 10 of 159 questions
Q141
Find the output void main ( ) { int me=9, you=1; printf("%d', (me+you) ++); }
  • A 10
  • B 11
  • C Compilation error
  • D None of these
Answer: Option C
Q142
Find the output void main ( ) { char acc='8'; int 1td=8; printf("%d %d %d", 1td, 1td+=acc>='0' &&acc<='9' ,acc++); }
  • A 8 8 56
  • B 8 9 56
  • C 9 9 56
  • D Compilation error
Answer: Option C
Q143
Find the output unsigned bit (unsigned ha, int hi, int hu) { return (ha>>(hi+1-hu)) & ~ (~0<<hu); } void main( ) { unsigned idiot =118; printf("%d", bit (idiot, +9, 5)); }
  • A 3
  • B 4
  • C 5
  • D 6
Answer: Option A
Q144
If increase the float variables beyond its maximum range
  • A -ve value
  • B +ve value
  • C +INF
  • D - INF
Answer: Option C
Q145
Find the output if the input is ab void main ( ) { char c; while (c=getchar ( )! = '\n') printf("%d", c); }
  • A 65
  • B 66
  • C 6566
  • D 11
Answer: Option D
Q146
Find the output void main ( ) { float x=2.8, y=4; if (x%=y) printf("Both are equal"); else printf("Not equal"); }
  • A Both are equal
  • B Not equal
  • C Compilation error
  • D None of these
Answer: Option C
Q147
Find the output void main ( ) { float j; j=1000*1000; printf("%f", j); }
  • A 1000000
  • B 16960.00000
  • C Compilation error
  • D None of these
Answer: Option B
Q148
Find the output void main ( ) { float j; j=1000+1000; printf("%f', j); }
  • A 1000000
  • B 16960.00000
  • C Compilation error
  • D None of these
Answer: Option B
Q149
Find the output int i=40000; void main ( ) { printf (%1d", i); }
  • A 40000
  • B -25536
  • C Garbage
  • D None of these
Answer: Option A
Q150
Which of the following escape sequences output is only observed with the help of a printer ?
  • A \a, \t
  • B \b, \r
  • C \r, \v
  • D \f, \v
Answer: Option D
Questions and Answers for Competitive Exams Various Entrance Test