Basic C Programming MCQ

Basic C Programming MCQ
181. For the previous question, which of the following macro-calls, will find the hypotenuse of a right angled triangle with sides a + 1 AND B + 1 ?
  • log (n) + 1
  • log (n - 1) + 1
  • log (n + 1) + 1
  • none of the above
Show Answer
182. The statement printf ("%d", 10?0?25:11:12); prints
  • 10
  • 0
  • 12
  • 11
Show Answer
183. The statement printf ("%d", (a++)); prints
  • the current value of a
  • the value of a + 1
  • an error message
  • garbage
Show Answer
184. The statement printf ("%", ++5); prints
  • 5
  • 6
  • an error message
  • garbage
Show Answer
185. The statement printf ("%d", size of (" ")) ; prints
  • an error message
  • 0
  • garbage
  • 1
Show Answer
186. If p is a pointer to an integer an t is a pointer to a character then size of (p) will be
  • same as that sizeof (t)
  • greater than that of sizeof (t)
  • less than that sizeof (t)
  • none of the above
Show Answer
187. Which of the following comments about arrays and pointers is/are not true ?
  • Both are exactly same
  • Array is a constant pointer
  • Pointer is an one-dimensional array
  • Pointer is a dynamic array
Show Answer
188. lint is
  • a C compiler
  • an inter-active debugger
  • a C interpreter
  • a tool for analyzing a C program
Show Answer
189. cb is a
  • C code beautifying tool
  • C interpreter
  • C compiler
  • none of the above
Show Answer
190. It is not advisable to use macros instead of functions because
  • it increase the code size
  • no type checking will be done
  • recursion is not possible
  • pointers cannot be used with macro identifiers
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test