Page 1

Unit III: Program Testing and Debugging

Testing (4+14+4=22) Q 1. Testing is a____if a program does not work correctly. A Failure B Success C Complete D Partial *Q 2. White box testing is of the following form: A Test engineer has complete knowledge of the code and functionality of the program, and testing is based on this knowledge.

B

Test engineer has no knowledge of the code but has full knowledge of the functionality of the program.

C

Test engineer has complete knowledge of the code but has no knowledge of the functionality of the program.

D

Test engineer has no knowledge of the code and does not know how the code functions, and testing is based mostly on requirement sheets.

Q 3. The inputs for developing a test plan are taken from A Project plan B Business plan C Support plan D None of the above Q 4. To make a program useful and error free two processes are important. They are _______. A planning & Testing B Testing & Debugging C Planning & Debugging D Debugging & linking


Unit III: Program Testing and Debugging

Syntax Errors Q 1. Which of the following is a type of error? A compile time B syntax C Logical D All the above Q 2. Which of the following is a type of an error? A Syntax Error B Logical Error C Run-time Error D All of above Q 3. Which of the following are syntax errors A Incorrect punctuation B Missing semicolon C Missing Declarations D All of the above Q 4. Which of the following errors can be detected by a ` Compiler ` ? A Illegal characters B Semantic errors C use of undefined variable names D all of these Q 5. Syntax errors are ___________ than logical error. A easy to remove B difficult to remove C difficult to detect D None of above Unit III: Program Testing and Debugging Prepared by: Mr. Laxman J. Deokate

Q 6. Syntax error typically involve ________ . A Incorrect punctuation B Invalid characters C Not using separators such as a semicolon D All of above Q 7. A program can not be compiled until all of its _____ errors have been corrected. A logical B Run time


Unit III: Program Testing and Debugging

C Syntax D All of the above Q 8. The errors that can be pointed out by the compiler are A Syntax errors B Semantic errors C Logical errors D None of the above

Logical (Run-time) Errors Q 9. The printf() function returns which value when an error occures? A positive value B zero C Negative value D None of these\ Q 10. In computer programming, a logical error is a bug in a program that causes the program ....... A to operate incorrectly B to fail C to go into an infinite loop D All of the above Q 11. Errors that occur when rules of programming language are not followed________ A logical errors B syntax Errors C User Errors D Program Errors Q 12. Run Time Errors are encountered at the time of _________ A Execution B Compilation C Coding D Saving Q 13. Due to logical error program will produce _______ . A Incorrect output B Required output


Unit III: Program Testing and Debugging

C Garbage D Incorrect output or garbage

*Q 14. Logical error in a program will ___________ error message. A Produce B Not produce C do nothing D All of above

Debugging *Q 1. Which of the following would be the most appropriate way to debug a problematic code? A Comment out the whole code and progressively uncomment it, till you find the error

B Put appropriately named print statements throughout the code and follow the output to find the error C Both of the above D None of the above

Q 2. A Debugger is_____ A a compiler B an active debugger C a C interpreter D a analyzing tool in C Q 3. ______________ being a reactive process, it must be carried out when errors are found in a program. A Testing B Debugging C Evaluating D None of the above Q 4. Program errors are known as ____________, and the process of detecting and correcting these errors is called ______________.


Unit III: Program Testing and Debugging

A Virus, Testing. B Bugs, Debugging. C Defects, Checking. D None of these.

UnitIII  

Test engineer has no knowledge of the code and does not know how the code functions, and testing is based mostly on requirement sheets. Test...

Read more
Read more
Similar to
Popular now
Just for you