250+ TOP MCQs on Debugging and Answers

Computer Fundamentals Multiple Choice Questions on “Debugging”.

1. Examination of the program step by step is called ______________
a) Controlling
b) Tracing
c) Stepping
d) Testing

Answer: c
Clarification: 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.
a) True
b) False

Answer: b
Clarification: 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 __________
a) GDB
b) GNB
c) FDB
d) FNB

Answer: a
Clarification: 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?
a) he
b) h
c) assist
d) assistant

Answer: b
Clarification: 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

Answer: c
Clarification: 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.
a) run
b) exit
c) execute
d) e

Answer: a
Clarification: 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.

  250+ TOP MCQs on The Internet and its Services and Answers

7. Which of the following does not affects the execution of the program?
a) Arguments
b) Environment
c) Control
d) I/o

Answer: c
Clarification: Execution is affected by :
-> arguments
-> environment
-> 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

Answer: b
Clarification: 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?
a) Identifying
b) Isolating
c) Test
d) Fixing

Answer: c
Clarification: 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

Answer: a
Clarification: run > outfile directs the output to the file outfile. Certain commands like ‘ cd dir ‘ are used to change the working directory.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top