This set of Linux / Unix questions and answers focuses on GDB. This is set 1.
1. Which one of the following is not true about GDB?
a) quit command is used to exit the GDB
b) kill command is used to stop execution in GDB
c) if the execution is stopped by kill command then it can not be started again
d) none of the mentioned
View Answer
Explanation: None.
2. While debugging with GDB
a) variables can be print
b) variables can be modify
c) variables can be print & modify
d) none of the mentioned
View Answer
Explanation: None.
3. GDB command “frame” is used
a) to change the stack frames
b) to check the stack frames only
c) it is not a valid command
d) none of the mentioned
View Answer
Explanation: None.
4. The GDB command “info local”
a) displays the list of local variables
b) value of local values for the current stack frame
c) displays the list of local variables & value of local values for the current stack frame
d) none of the mentioned
View Answer
Explanation: None.
5. If we have multiple source files, then during the debugging with GDB
a) breakpoint can not be set
b) break point can be set by “break” command with a filename
c) break point can be set only to makefile
d) none of the mentioned
View Answer
Explanation: None.
6. What is temporary breakpoint?
a) it stops the program once
b) it is removed after one execution of the program
c) it stops the program once & removes after one execution of the program
d) none of the mentioned
View Answer
Explanation: None.
7. In GDB breakpoints can be skipped by the command
a) ignore
b) reject
c) skip
d) none of the mentioned
View Answer
Explanation: None.
8. Which GDB command is used to examine the memory?
a) x
b) y
c) z
d) none of the mentioned
View Answer
Explanation: None.
9. Which one of the following is not true about the GDB?
a) info register is used to see that what is in the processor registers
b) processor registers can not be accessed by GDB
c) first 32 bits of the variable can not be examined
d) none of the mentioned
View Answer
Explanation: None.
10. Assemble code of the program can be displayed in GDB by the command
a) disassemble
b) assemble
c) assembly
d) none of the mentioned
View Answer
Explanation: None.
Sanfoundry Global Education & Learning Series – Linux Administration & Programming.
Here’s the list of Best Books in Linux Commands & Shell Programming.
Here’s the list of Best Books in Linux Kernel, Device-Drivers & System Programming.
To practice all questions on Linux Administration & Programming, here is complete set of 1000+ Multiple Choice Questions and Answers on Linux.
- Buy Information Technology Books
- Buy Linux Books
- Apply for Programming Internship
- Practice Programming MCQs
- Apply for Linux Internship