C Data Types 2 Questions and Answers

Practice Mode
Showing 10 of 159 questions
Q51
Find the output #include"limits.h" void main ( ) { signed short int x=9; if (x & INT_MIN) = = INT_MIN printf("neglative"); else printf ("positive"); }
  • A Positive
  • B Negative
  • C Compilation error
  • D None of these
Answer: Option A
Q52
L-value is not applicable to
  • A Scalar data types
  • B Derived data types
  • C Pointer
  • D Function name
Answer: Option D
Q53
Find the output void main ( ) { int x =9; float f=(float)x/2; printf ("%d", f); }
  • A 4.50000
  • B 4
  • C 0
  • D Garbage value
Answer: Option C
Q54
Find the output void main ( ) { int x=266; printf ("%0x", x); }
  • A No output
  • B 266
  • C 10A
  • D 10a
Answer: Option D
Q55
Find the output void main ( ) { int x=078; printf ("%d", x); }
  • A 0378
  • B 378
  • C Compilation error
  • D None of these
Answer: Option C
Q56
Find the output void main ( ) { printf ("/*cd*/ef"); }
  • A abef
  • B ab
  • C ab/8cd*/ef
  • D Error: comments are not allowed within the sentence
Answer: Option C
Q57
Find the output. void main ( ) { int a=1,b ; b=+-+a+-a; printf (%d", b); }
  • A 0
  • B 2
  • C -2
  • D None of these
Answer: Option C
Q58
Find the output void main ( ) { int x=2; printf ("%d", x*=3/2); }
  • A 2
  • B 0
  • C 3
  • D None of the these
Answer: Option A
Q59
Find the output extern int i; void main ( ) { printf ("%d", i); }
  • A 0
  • B Garbage
  • C Compilation error
  • D None of these
Answer: Option C
Q60
Find the output. void main ( ) { unsigned 10ng i=40000; printf (%d", i); }
  • A % 1
  • B 40000
  • C Garbage value
  • D No output.
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test