Computer Programming Questions and Answers FAQ PDF Download

Learn computer programming questions and answers FAQ, c language FAQ, competency based interview questions with MCQs based online test prep. These frequently asked questions has multiple choice questions (MCQ), c language quiz questions and answers: output of following part of program is <code> for(num=0; num<26;num++)<br>{ square=num*num;<br>printf("%5d %5d ",num, square);<br>}</code>, answer key with options prints 26 lines on screen containing an integer from 0 to 25, prints 26 lines on screen containing an integer from 0 to 25 and its square on each, prints 26 lines on screen containing an integer from 1 to 25 and its square on each and prints 26 lines on screen containing an integer from 1 to 25 for competitive exam preparation. Free FAQ, situational interview questions are to learn computer programming questions and answers quiz online with MCQs to practice test questions with answers.

FAQ: Computer Programming Questions and Answers PDF Download

MCQ: Output of following part of program is <code> for(num=0; num<26;num++)<br>{ square=num*num;<br>printf("%5d %5d ",num, square);<br>}</code>

  1. Prints 26 lines on screen containing an integer from 0 to 25
  2. Prints 26 lines on screen containing an integer from 0 to 25 and its square on each
  3. Prints 26 lines on screen containing an integer from 1 to 25 and its square on each
  4. Prints 26 lines on screen containing an integer from 1 to 25

B

MCQ: In C language, output of expression 1 && (30 % 10 >= 0) && (30 % 10 <= 3) is

  1. 1
  2. 0
  3. 101
  4. 2

A

MCQ: When one can determine number of loop iterations for solution of problem before executing program then loop kind is called

  1. Counter-controlled loop
  2. Sentinel-controlled loop
  3. End-filed controlled loop
  4. General conditional loop

A

MCQ: When program demands repeat interactive input until a valid value for data range is entered then loop kind is called

  1. Sentinel-controlled loop
  2. End-filed controlled loop
  3. General conditional loop
  4. Input validation loop

D

MCQ: Output of following part of program is where resistance=2 <code>for(volts=20; volts>=-20; volts-=10)<br>{ current=volts/resistance;<br>printf("%5d %8.3f ",volts,current);<br>}</code>

  1. 10<br>0<br>-10
  2. 10<br>50<br>0<br>-50<br>-10
  3. 10<br>5<br>0<br>-5<br>-10
  4. 100<br>50<br>0<br>-50<br>-100

C