1. For debugging with GDB, the file “sanfoundry” can be created with the command
a) gcc -g -o sanfoundry sanfoundry.c
b) gcc -g sanfoundry.c
c) gdb sanfoundry
d) none of the mentioned
View Answer
Explanation: None.
2. For debugging with GDB, the compiled program can be run by the command
a) run
b) execute
c) ./<filename>
d) none of the mentioned
View Answer
Explanation: None.
3. In GDB, breakpoints can be set by the command
a) break
b) b
c) both break and b
d) none of the mentioned
View Answer
Explanation: None.
4. GDB stands for
a) GNU debugger
b) General debugging breakpoint
c) General debugger
d) None of the mentioned
View Answer
Explanation: None.
5. GDB can be used for
a) c language
b) c++ language
c) both c and c++ language
d) none of the mentioned
View Answer
Explanation: None.
6. The command “gdb sanfoundy”
a) will start debugging for the file “sanfoundry” if the file is compiled with -g option with GCC
b) will create executable for debugging
c) will provide all errors present in the file “sanfoundry”
d) none of the mentioned
View Answer
Explanation: None.
7. In debugging with GDB, break points can be set to
a) any line
b) any function
c) both any line and function
d) none of the mentioned
View Answer
Explanation: None.
8. In GDB debugging, we can proceed to the next breakpoint with command
a) next
b) continue
c) both next and continue
d) none of the mentioned
View Answer
Explanation: None.
9. At the time of debugging with GDB, if we just press ENTER
a) GDB will repeat the same command you just gave it
b) GDB will do nothing
c) GDB will exit
d) None of the mentioned
View Answer
Explanation: None.
10. To print the value of a variable while debugging with GDB, ______ command can be used.
a) printf
b) print
c) show
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
- Apply for Linux Internship
- Buy Information Technology Books
- Buy Linux Books
- Practice Programming MCQs