a) gcc -g -o .c
b) gcc -g .c
c) gdb
d) none of the mentioned
Answer: a
Clarification: None.
2. For debugging with GDB, the compiled program can be run by the command
a) run
b) execute
c) ./
d) none of the mentioned
Answer: a
Clarification: 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
Answer: c
Clarification: None.
4. GDB stands for
a) GNU debugger
b) General debugging breakpoint
c) General debugger
d) None of the mentioned
Answer: a
Clarification: None.
5. GDB can be used for
a) c language
b) c++ language
c) both c and c++ language
d) none of the mentioned
Answer: c
Clarification: None.
6. The command “gdb sanfoundy”
a) will start debugging for the file “” 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 “”
d) none of the mentioned
Answer: a
Clarification: 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
Answer: c
Clarification: 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
Answer: b
Clarification: 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
Answer: a
Clarification: 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
Answer: b
