C Data Types 2 Questions and Answers

Practice Mode
Showing 10 of 159 questions
Q151
Find the output void main ( ) { printf ("%d", 4>>256); }
  • A 0
  • B 4
  • C 16
  • D 32
Answer: Option B
Q152
Find the output void main ( ) { int i=3, j=2, k=1; printf ("%d/%d"); }
  • A 1
  • B 0
  • C 3/2
  • D 1/2
Answer: Option D
Q153
Find the output if the input is 5 5.75 void main ( ) { int i=1; float f=2.25; scanf("%d a %f', &i, &f); printf("%d %.2f", 1, f); }
  • A 1 2.25
  • B 5 5.75
  • C 5 2.25
  • D None of these
Answer: Option C
Q154
Find the output. void main ( ) float x=3.2; float y=2.2; printf("%.2f", x/y); }
  • A 1.45
  • B 1.45 45 45
  • C 1.50
  • D Compilation error
Answer: Option A
Q155
Find the output void main ( ) { float x,y; x=4.231; y=(int) x/2.0; printf("%f", y); }
  • A 2
  • B 0
  • C 2.00000
  • D 0.00000
Answer: Option C
Q156
Find the output void main ( ) { int a=0150, b=057, c; c=a+b; printf ("%d", c); }
  • A 0257
  • B 257
  • C 151
  • D None of these
Answer: Option C
Q157
Find the output void main ( ) { int i=49; printf("%d %p", i, i); }
  • A 49 0049
  • B 49 0001
  • C 49 0031
  • D 49 1
Answer: Option C
Q158
Find the output void main ( ) { int a=0x100; int b=0x100; int c=a*b; printf("%x", c); }
  • A 10000
  • B fffff
  • C 0
  • D None of these
Answer: Option C
Q159
Find the output void main ( ) { int a="%d"; printf("%d',a); }
  • A %d
  • B Garbage
  • C 37
  • D %
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test