

MCQOPTIONS
Saved Bookmarks
This section includes 746 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
251. |
The result of an expression can be assigned to an environement variable with the command |
A. | assign |
B. | set |
C. | env |
D. | none of the mentioned |
Answer» C. env | |
252. |
Which one of the following GDB command deletes any breakpoint at the next instruction to be executed in the selected stack frame? |
A. | clear |
B. | delete |
C. | disable |
D. | none of the mentioned |
Answer» B. delete | |
253. |
Which one of the following GDB command allows to move from one stack frame to another without printing the frame? |
A. | select-frame |
B. | frame |
C. | frame move |
D. | none of the mentioned |
Answer» B. frame | |
254. |
The GDB text user interface uses the ____ library to show the source file. |
A. | Curses |
B. | YUI |
C. | JUI |
D. | None of the mentioned |
Answer» B. YUI | |
255. |
By default the GDB automatically executes the command from its |
A. | init files |
B. | start files |
C. | begin files |
D. | none of the mentioned |
Answer» B. start files | |
256. |
The user can define a command for GDB with the command |
A. | define |
B. | command |
C. | assign |
D. | none of the mentioned |
Answer» B. command | |
257. |
The GDB command “show output-radix” |
A. | sets the default base for numeric display |
B. | displays the current default base for numeric display |
C. | sets the default base |
D. | none of the mentioned |
Answer» C. sets the default base | |
258. |
The command “show commands” of GDB |
A. | displays the last 10 commands in the command history |
B. | displays all commands of the command history |
C. | displays all the commands available in GDB |
D. | none of the mentioned |
Answer» B. displays all commands of the command history | |
259. |
Which one of the following command saves the command history of GDB in a file? |
A. | history |
B. | set history |
C. | set history save on |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
260. |
In GDB, a tracepoint can be set by the command |
A. | trace |
B. | set |
C. | break trace |
D. | none of the mentioned |
Answer» B. set | |
261. |
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 |
Answer» B. display float | |
262. |
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 |
Answer» B. # | |
263. |
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 |
Answer» B. environment variables | |
264. |
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 |
Answer» B. h | |
265. |
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 |
Answer» B. @ | |
266. |
With the list command, by default GDB prints the ____ source lines. |
A. | 20 |
B. | 10 |
C. | all |
D. | none of the mentioned |
Answer» C. all | |
267. |
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 |
Answer» B. catchpoint | |
268. |
Inside GDB, a program may stop because of |
A. | a signal |
B. | a breakpoint |
C. | step command |
D. | all of the mentioned |
Answer» E. | |
269. |
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 |
Answer» B. gdb | |
270. |
The execution of the program in GDB can be affected by |
A. | arguments |
B. | working directory |
C. | environment |
D. | all of the mentioned |
Answer» E. | |
271. |
Assemble code of the program can be displayed in GDB by the command |
A. | disassemble |
B. | assemble |
C. | assembly |
D. | none of the mentioned |
Answer» B. assemble | |
272. |
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 |
Answer» D. none of the mentioned | |
273. |
Which GDB command is used to examine the memory? |
A. | x |
B. | y |
C. | z |
D. | none of the mentioned |
Answer» B. y | |
274. |
In GDB breakpoints can be skipped by the command |
A. | ignore |
B. | reject |
C. | skip |
D. | none of the mentioned |
Answer» B. reject | |
275. |
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 |
Answer» D. none of the mentioned | |
276. |
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 |
Answer» C. break point can be set only to makefile | |
277. |
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 |
Answer» D. none of the mentioned | |
278. |
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 |
Answer» B. to check the stack frames only | |
279. |
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 |
Answer» D. none of the mentioned | |
280. |
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 |
Answer» D. none of the mentioned | |
281. |
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 |
Answer» B. break all | |
282. |
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 |
Answer» D. none of the mentioned | |
283. |
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 |
Answer» B. b start | |
284. |
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 |
Answer» E. | |
285. |
Which GDB command reloads the debugging information? |
A. | file |
B. | reload |
C. | reload |
D. | none of the mentioned |
Answer» B. reload | |
286. |
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 |
Answer» D. none of the mentioned | |
287. |
The specific break point can be deleted by _____ command in GDB. |
A. | delete |
B. | del |
C. | remove |
D. | remove |
Answer» B. del | |
288. |
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 |
Answer» C. forwardtrace | |
289. |
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 |
Answer» B. show | |
290. |
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 |
Answer» B. print/h | |
291. |
To print the value of a variable while debugging with GDB, ______ command can be used |
A. | printf |
B. | |
C. | show |
D. | none of the mentioned |
Answer» C. show | |
292. |
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» B. GDB will do nothing | |
293. |
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» C. both next and continue | |
294. |
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» D. none of the mentioned | |
295. |
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 |
Answer» B. will create executable for debugging | |
296. |
GDB can be used for |
A. | c language |
B. | c++ language |
C. | both c and c++ language |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
297. |
GDB stands for |
A. | GNU debugger |
B. | General debugging breakpoint |
C. | General debugger |
D. | None of the mentioned |
Answer» B. General debugging breakpoint | |
298. |
In GDB, breakpoints can be set by the command |
A. | break |
B. | b |
C. | both break and b |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
299. |
For debugging with GDB, the compiled program can be run by the command |
A. | run |
B. | execute |
C. | ./<filename> |
D. | none of the mentioned |
Answer» B. execute | |
300. |
Which command can be used to update the shared library system? |
A. | lconfig |
B. | ldconfig |
C. | slconfig |
D. | none of the mentioned |
Answer» C. slconfig | |