

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.
301. |
For a shared library, version number is changed when |
A. | changes done in code make the shared library incompatible with the previous version |
B. | changes done in code does not make the shared library incompatible with the previous version |
C. | when minor number is changed |
D. | none of the mentioned |
Answer» B. changes done in code does not make the shared library incompatible with the previous version | |
302. |
Shared libraries are linked with the program |
A. | at the time of creation of executable |
B. | at the run time |
C. | at the time of creation of executable & run time |
D. | none of the mentioned |
Answer» C. at the time of creation of executable & run time | |
303. |
After using the shared library, memory can be done free by calling |
A. | dlclose |
B. | slclose |
C. | lclose |
D. | none of the mentioned |
Answer» B. slclose | |
304. |
Which option of GCC compiler provides the linking with shared libraries? |
A. | -lmylib |
B. | -lib |
C. | -mylib |
D. | none of the mentioned |
Answer» B. -lib | |
305. |
In GCC compiler, “-shared” option is given to create the shared library with |
A. | source files |
B. | object files |
C. | executables |
D. | none of the mentioned |
Answer» C. executables | |
306. |
In linux, shared library is a |
A. | text file |
B. | binary file |
C. | device file |
D. | none of the mentioned |
Answer» C. device file | |
307. |
Shared libraries can be shared between |
A. | various running programs |
B. | only 2 running programs |
C. | only 8 running programs |
D. | none of the mentioned |
Answer» B. only 2 running programs | |
308. |
When a program is linked with a shared library |
A. | only a small table is created in the executable |
B. | executable contains the whole content of respective .so file |
C. | executable contains nothing related with the shared libraries |
D. | none of the mentioned |
Answer» B. executable contains the whole content of respective .so file | |
309. |
In linux shared libraries has the extension of |
A. | .so |
B. | .si |
C. | .sl |
D. | none of the mentioned |
Answer» B. .si | |
310. |
The archive(ar) utility in linux can |
A. | create a new static library |
B. | insert the object files into the static library |
C. | replace the object files into the static library |
D. | all of the mentioned |
Answer» E. | |
311. |
Which one of the following command can list the symbols defined in a library? |
A. | mn |
B. | nm |
C. | nn |
D. | mm |
Answer» C. nn | |
312. |
In linux, the static libraries are mostly installed in |
A. | /usr/lib |
B. | /usr/local/lib |
C. | both /usr/lib and /usr/local/lib |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
313. |
Which gcc option is used to specify the library? |
A. | -c |
B. | -l |
C. | -a |
D. | -o |
Answer» C. -a | |
314. |
To use the static library in the program |
A. | header file must be provided to in the source code |
B. | path for the library must be specified |
C. | header file must be provided to in the source code & path for the library must be specified |
D. | header file must be provided to in the source code & path for the library must be specified |
Answer» D. header file must be provided to in the source code & path for the library must be specified | |
315. |
If a program is linked against a static library then |
A. | machine code of the used function is copied in the executable |
B. | used function definition is copied into the preprocessd code |
C. | used function definition is provided at the time of compiling |
D. | none of the mentioned |
Answer» B. used function definition is copied into the preprocessd code | |
316. |
In Linux, the static libraries can be created by |
A. | ar command |
B. | as command |
C. | ap command |
D. | aq command |
Answer» B. as command | |
317. |
Libraries can be linked with ____ to create executables. |
A. | other libraries |
B. | other object files |
C. | both other libraries and object files |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
318. |
The library contains the |
A. | pre-compiled object files |
B. | source files |
C. | header files |
D. | none of the mentioned |
Answer» B. source files | |
319. |
In Linux, the static library has the extension of |
A. | .a |
B. | .b |
C. | .c |
D. | .d |
Answer» B. .b | |
320. |
The COFF stands for |
A. | common object file format |
B. | combined operation for file formats |
C. | combined object file format |
D. | none of the mentioned |
Answer» B. combined operation for file formats | |
321. |
The assmebly code generated depends upon the |
A. | processor archietecture |
B. | ram size |
C. | both processor archietecture and RAM size |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
322. |
Preprocessed files are given the file extension _____ for c++ programs. |
A. | .i |
B. | .ii |
C. | .iii |
D. | none of the mentioned |
Answer» E. | |
323. |
Which compilation step makes sure that all the undefined symbols in the code are resolved |
A. | linking |
B. | compiling |
C. | preporcessing |
D. | none of the mentioned |
Answer» B. compiling | |
324. |
In the preprocessing stage of compilation |
A. | header files are actually expanded and included in the source code of the program |
B. | macros are replaced by their respective values |
C. | all the comments are stripped off |
D. | all of the mentioned |
Answer» E. | |
325. |
Command line parameters are passed by the |
A. | preprocessor |
B. | assembler |
C. | compiler |
D. | linker |
Answer» E. | |
326. |
The lines in our code that begin with the “#” character are |
A. | preprocessor directives |
B. | macros |
C. | header files |
D. | none of the mentioned |
Answer» B. macros | |
327. |
Which one of the following command can be used to provide executable permissions for a file? |
A. | chmod +x <filename> |
B. | chmod 777 <filename |
C. | both chmod +x and chmod 777 |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
328. |
The a.out file is in the |
A. | ELF format |
B. | EXE format |
C. | Both EXE and ELF format |
D. | None of the mentioned |
Answer» B. EXE format | |
329. |
The preprocessor creates the file with extension |
A. | .a |
B. | .i |
C. | .s |
D. | .o |
Answer» C. .s | |
330. |
The macros specifies in source code are expanded by |
A. | preprocessor |
B. | assembler |
C. | compiler |
D. | linker |
Answer» B. assembler | |
331. |
If we do not specify the executable file name at the compilation time in GCC, then in linux the compiler creates executable named as |
A. | a.out |
B. | a.exe |
C. | x.out |
D. | x.exe |
Answer» B. a.exe | |
332. |
The object file contains the |
A. | assembly code |
B. | machine code |
C. | modified source code |
D. | none of the mentioned |
Answer» C. modified source code | |
333. |
What is the role of linker in the compilation process? |
A. | linker links the object code with the library code |
B. | linker converts machine code into executable machine code |
C. | linker converts machine code into executable machine code |
D. | all of the mentioned |
Answer» E. | |
334. |
The assembly code is converted into the machine code by |
A. | compiler |
B. | assembler |
C. | linker |
D. | none of the mentioned |
Answer» C. linker | |
335. |
The compiler converts |
A. | assembly code into machine code |
B. | preprocessed source code into assembly code |
C. | machine code into assembly code |
D. | none of the mentioned |
Answer» C. machine code into assembly code | |
336. |
The preprocessor removes the _______ from the source code. |
A. | comments |
B. | comments |
C. | both comments and header files |
D. | none of the mentioned |
Answer» B. comments | |
337. |
The correct sequence of GCC compilation process is |
A. | preprocessing -> compilation -> assemble -> linking |
B. | assemble -> preprocessing -> compilation -> linking |
C. | preprocessing -> assemble -> compilation -> linking |
D. | none of the mentioned |
Answer» B. assemble -> preprocessing -> compilation -> linking | |
338. |
Which gcc option reports the cpu time taken by each subprocess in the compilation sequence? |
A. | -time |
B. | -cpu |
C. | -process |
D. | none of the mentioned |
Answer» B. -cpu | |
339. |
Which option of the gcc is used to warn is padding is included in structure? |
A. | -Wpadded |
B. | -Wpad |
C. | -Wpadding |
D. | None of the mentioned |
Answer» B. -Wpad | |
340. |
The command line options of gcc can also be read from a file with |
A. | @ |
B. | $ |
C. | # |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
341. |
The gcc option -Wunused warns when a _____ variable is unused aside from its declaration. |
A. | variable |
B. | function |
C. | macro |
D. | none of the mentioned |
Answer» B. function | |
342. |
Pipes are used rather than temporary files for communication between the various stages of compilation in gcc when |
A. | -pipe option is used |
B. | -temp option is used |
C. | –disable -temp option is used |
D. | none of the mentioned |
Answer» B. -temp option is used | |
343. |
Which gcc option undefines a preprocessor macro? |
A. | -U |
B. | -u |
C. | -undefine |
D. | none of the mentioned |
Answer» B. -u | |
344. |
The -Wextra option of gcc |
A. | is same as -w option |
B. | does not exist |
C. | enables extra warning messages |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
345. |
Which option of gcc makes the compiler print out each function name as it is compiled, and print some statistics about each pass when it finishes? |
A. | -p |
B. | -P |
C. | -q |
D. | -Q |
Answer» E. | |
346. |
Which option of gcc looks in the provided directory for library files? |
A. | -l |
B. | -L |
C. | -link |
D. | none of the mentioned |
Answer» C. -link | |
347. |
Which option of gcc links with a library file? |
A. | -l |
B. | -L |
C. | -link |
D. | none of the mentioned |
Answer» B. -L | |
348. |
The -shared option of gcc generates shared ______ for shared library. |
A. | object file |
B. | preprocessed file |
C. | source file |
D. | none of the mentioned |
Answer» B. preprocessed file | |
349. |
The -fPIC option of gcc |
A. | generates the position independent code of shared libraries |
B. | opens the source file in readonly mode |
C. | opens the source file |
D. | none of the mentioned |
Answer» B. opens the source file in readonly mode | |
350. |
Which option of gcc adds include directory of header files? |
A. | -i |
B. | -l |
C. | -e |
D. | -E |
Answer» C. -e | |