This set of Computer Fundamentals Multiple Choice Questions & Answers (MCQs) focuses on “Debugging”.
1. Examination of the program step by step is called ______________
Explanation: Debuggers perform the task of step by step examination of the code which is called stepping. They also perform tracing.
2. The examination of changing values of variables is called stepping.
Explanation: The statement is false. It is called tracing. In tracing, the variables are examined wherever it value is changing.
3. A freeware GNU Debugger is __________
Explanation: GDB is a free GNU debugger which runs on most of the Unix-like platforms. It works for multiple programming languages. GNU is free software.
4. Which of the following is written for getting help in GDB?
Explanation: In this h stands for help. h or help both commands can be used. Help lists all the commands.
5. h command gives ___________
a) A list of all the commands starting from h
b) Describes all the commands
c) Displays a short description of the command
d) Displays all the programs
Explanation: h command displays a short description of the command. If simply help is written it gives a list of all the commands.
6. ____________ creates an inferior process that runs your program.
Explanation: run or r command creates an inferior process that runs your program. If there are no errors the program will finish and results will be displayed accordingly.
7. Which of the following does not affects the execution of the program?
Explanation: Execution is affected by :
-> Working directory
-> standard I/O.
8. ‘set args ‘ without arguments can ___________
a) initialize all the arguments
b) remove all the arguments
c) no change
d) show all the arguments
Explanation: set args command can remove all the arguments.
Syntax: set args arg1 arg2 …
If the arguments are not given it deletes all the arguments.
9. Which is not involved in debugging?
Explanation: Testing is a different process and is different from debugging. Debugging involves identifying, isolating and fixation of the problems or errors.
10. run > outfile command is used to _________
a) direct output to the file outfile
b) jump to a file outfile
c) enter a file outfile
d) edit a file outfile
Explanation: run > outfile directs the output to the file outfile. Certain commands like ‘ cd dir ‘ are used to change the working directory.
Sanfoundry Global Education & Learning Series – Computer Fundamentals.
To practice all areas of Computer Fundamentals, here is complete set of 1000+ Multiple Choice Questions and Answers.