Basic C Programming MCQ Questions and Answers

Practice Mode
Showing 10 of 198 questions
Q191
In a C program constant is defined
  • A befire main
  • B after main
  • C anywhere, but starting on a new line
  • D none of the above
Answer: Option C
Q192
The rule for implicit type conversion is
  • A int < unsigned < float < double
  • B unsigned < int < float <double
  • C int < unsigned < double < float
  • D unsigned < int < double < float
Answer: Option A
Q193
Which of the following is/are syntactically correct ?
  • A for ();
  • B for (;);
  • C for (,);
  • D for (;;) ;
Answer: Option D
Q194
Use of macro instead of function is recommended
  • A when one wants to reduce the execution time
  • B when there is a loop with a function call inside
  • C when a function is called in many places in a program
  • D in all the above cases
Answer: Option
Q195
The ascending order of precedence of the bit-wise operators &. ^, I is
  • A &, ^, I
  • B ^, &, I
  • C I, ^, &
  • D &, I, ^
Answer: Option C
Q196
Consider the declaration char street[10] = "abcdefghi"; choose the correct remarks(s).
  • A & street and street will have different values
  • B &street is meaningless
  • C &street+1 and street+1 will have the same values
  • D none of the above
Answer: Option D
Q197
The number of additions performed by the above program fragment is
  • A 27000
  • B 27000 * 3
  • C 9000 + 3 * 27000
  • D 9930 + 27000 * 3
Answer: Option D
Q198
Which of the following is a wrong example of a network layer ?
  • A Internet Protocol (IP)-ARPANET
  • B X.25 Packet Level Protocol (PLP)-ISO
  • C Source routing and domain naming-USNET
  • D X.25 Level 2-ISO
Answer: Option D
Questions and Answers for Competitive Exams Various Entrance Test