1. Which GDB command prints the value of a variable in hex.
a) print/x
b) print/h
c) print/e
d) none of the mentioned
View Answer
Explanation: None.
2. Which GDB command interrupts the program whenever the value of a variable is modified and prints the value old and new values of the variable?
a) watch
b) show
c) trace
d) none of the mentioned
View Answer
Explanation: None.
3. Which GDB command produces a stack trace of the function calls that lead to a segmentation fault?
a) trace
b) backtrace
c) forwardtrace
d) none of the mentioned
View Answer
Explanation: None.
4. The specific break point can be deleted by _____ command in GDB.
a) delete
b) del
c) remove
d) none of the mentioned
View Answer
Explanation: None.
5. The “step” command of GDB
a) executes the current line of the program
b) stops the next statement to be executed
c) executes the current line of the program & stops the next statement to be executed
d) none of the mentioned
View Answer
Explanation: None.
6. Which GDB command reloads the debugging information?
a) file
b) reload
c) debug
d) none of the mentioned
View Answer
Explanation: None.
7. GDB can be used
a) to find out the memory leakages
b) to get the result of a particular expression in a program
c) to find the reason of segementation fault
d) all of the mentioned
View Answer
Explanation: None.
8. Which GDB command can be used to put a breakpoint at the beginning of the program?
a) b main
b) b start
c) break
d) none of the mentioned
View Answer
Explanation: None.
9. To put the breakpoint at the current line ____ command can be used?
a) b
b) break
c) both b and break
d) none of the mentioned
View Answer
Explanation: None.
10. We can list all the breakpoint in GDB by the command
a) info break
b) break all
c) both info break and break all
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.
- Apply for Programming Internship
- Practice Programming MCQs
- Buy Information Technology Books
- Buy Linux Books
- Apply for Linux Internship