Computer Fundamentals Questions and Answers – Debugging

This set of Computer Fundamentals Multiple Choice Questions & Answers (MCQs) focuses on “Debugging”.

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

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

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

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

4. Which of the following is written for getting help in GDB?
a) he
b) h
c) assist
d) assistant
View Answer

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

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

Answer: a
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?
a) Arguments
b) Environment
c) Control
d) I/o
View Answer

Answer: c
Explanation: Execution is affected by :
-> arguments
-> environment
-> Working directory
-> standard I/O.
advertisement

8. ‘set args ‘ without arguments can ___________
a) initialize all the arguments
b) remove all the arguments
c) no change
d) show all the arguments
View Answer

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

Answer: c
Explanation: Testing is a different process and is different from debugging. Debugging involves identifying, isolating and fixation of the problems or errors.
advertisement

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
View Answer

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

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.