Basic C Programming MCQ Questions and Answers

Practice Mode
Showing 10 of 198 questions
Q21
If y is of integer type then the expressions 3 * (y - 8) / 9 and (y - 8) / 9 * 3 yield the same value if
  • A y is an even number
  • B y is an odd number
  • C y - 8 is an integer multiple of 9
  • D y - 8 is an integral multiple of 3
Answer: Option C
Q22
Integer division results in
  • A truncation
  • B rounding
  • C overflow
  • D none of the above
Answer: Option A
Q23
Which of the following comments about EOF are true ?
  • A Its value is defined within stdio.h.
  • B Its value is implementation depend
  • C Its value can be negative
  • D Its value should not equal the integer equivalent of any character
Answer: Option
Q24
The value of an automatic variable that is declared but not initialized will be
  • A 0
  • B -1
  • C unpredictable
  • D none of the above
Answer: Option C
Q25
Choose the correct statements.
  • A An identifier may start with an underscore.
  • B An identifier may end with an underscore
  • C IF is a valid identifier.
  • D The number of significant characters in an identifier is implementation dependent
Answer: Option
Q26
Choose the correct statements
  • A Constant expressions are evalutated at compile time
  • B String constants can be concatendated at compile time.
  • C Size of array must be known at compile time.
  • D None of the above
Answer: Option
Q27
The const feature can be applied to
  • A an identifier
  • B an array
  • C an array argument
  • D none of the above
Answer: Option
Q28
Which of the following operators takes only integer operands ?
  • A +
  • B *
  • C /
  • D %
Answer: Option D
Q29
In an expression involving II operator, evaluation
  • A will be stopped if one of its components evaluates to false
  • B will be stopped if one of its components evaluates to true
  • C takes place from right to left
  • D takes place from left to right
Answer: Option
Q30
Pick the operators that associate from the left
  • A +
  • B ,
  • C =
  • D <
Answer: Option
Questions and Answers for Competitive Exams Various Entrance Test