Basic C Programming MCQ

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