1. The execution of the program in GDB can be affected by
a) arguments
b) working directory
c) environment
d) all of the mentioned
View Answer
Explanation: None.
2. While debugging with GDB, arguments to the program can be specified by the arguments of _____ command.
a) run
b) gdb
c) make
d) none of the mentioned
View Answer
Explanation: None.
3. Inside GDB, a program may stop because of
a) a signal
b) a breakpoint
c) step command
d) all of the mentioned
View Answer
Explanation: None.
4. Which one of the following is a special breakpoint that stops the program when the value of an expression changes in GDB?
a) watchpoint
b) catchpoint
c) getpoint
d) none of the mentioned
View Answer
Explanation: None.
5. With the list command, by default GDB prints the ____ source lines.
a) 20
b) 10
c) all
d) none of the mentioned
View Answer
Explanation: None.
6. In GDB which one of the following allows us to specify a variable in terms of the file or function where it is defined?
a) ::
b) @
c) $
d) none of the mentioned
View Answer
Explanation: None.
7. If we want to print the value of a variable in hexadecimal, we have to use “print” command with the option ___ in GDB.
a) x
b) h
c) hex
d) none of the mentioned
View Answer
Explanation: None.
8. Which one of the following variables is used within GDB to hold on to a value and refer to it later?
a) convenience variables
b) environment variables
c) temporary variables
d) none of the mentioned
View Answer
Explanation: None.
9. In GDB, we can refer to machine register contents, in expressions, as variables with names starting with
a) $
b) #
c) !
d) none of the mentioned
View Answer
Explanation: None.
10. In GDB hardware-dependent information about the floating point unit can be displayed by the command
a) info float
b) display float
c) show float
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.
If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]
- Check Information Technology Books
- Check Linux Books
- Practice Programming MCQs
- Apply for Programming Internship