Unix/Lunux MCQ Quiz Hub

Linux Mcqs Questions Set 10

Choose a topic to test your knowledge and improve your Unix/Lunux skills

The correct sequence of GCC compilation process is





✅ Correct Answer: 1

The preprocessor removes the _______ from the source code.





✅ Correct Answer: 1

The compiler converts





✅ Correct Answer: 2

The assembly code is converted into the machine code by





✅ Correct Answer: 2

What is the role of linker in the compilation process?





✅ Correct Answer: 4

If sanfoundry.c is compiled with GCC, then the sanfoundry.s file will contain the





✅ Correct Answer: 1

The object file contains the





✅ Correct Answer: 2

 If we do not specify the executable file name at the compilation time in GCC, then in linux the compiler creates executable named as





✅ Correct Answer: 1

The macros specifies in source code are expanded by





✅ Correct Answer: 1

The preprocessor creates the file with extension





✅ Correct Answer: 2

The a.out file is in the





✅ Correct Answer: 1

Which one of the following command can be used to provide executable permissions for a file?





✅ Correct Answer: 3

The lines in our code that begin with the “#” character are





✅ Correct Answer: 1

Command line parameters are passed by the





✅ Correct Answer: 4

In the preprocessing stage of compilation





✅ Correct Answer: 4

Which compilation step makes sure that all the undefined symbols in the code are resolved.





✅ Correct Answer: 1

Which one of the following is not true?





✅ Correct Answer: 1

Preprocessed files are given the file extension _____ for c++ programs.





✅ Correct Answer: 2

The assmebly code generated depends upon the





✅ Correct Answer: 3

The COFF stands for





✅ Correct Answer: 1

In Linux, the static library has the extension of





✅ Correct Answer: 1

The library contains the





✅ Correct Answer: 1

Libraries can be linked with ____ to create executables.





✅ Correct Answer: 3

In Linux, the static libraries can be created by





✅ Correct Answer: 1

If a program is linked against a static library then





✅ Correct Answer: 1

To use the static library in the program





✅ Correct Answer: 3

Which gcc option is used to specify the library?





✅ Correct Answer: 2

In linux, the static libraries are mostly installed in





✅ Correct Answer: 3

Which one of the following command can list the symbols defined in a library?





✅ Correct Answer: 2

The archive(ar) utility in linux can





✅ Correct Answer: 4

In linux shared libraries has the extension of





✅ Correct Answer: 1

When a program is linked with a shared library





✅ Correct Answer: 1

Shared libraries can be shared between





✅ Correct Answer: 1

In linux, shared library is a





✅ Correct Answer: 2

In GCC compiler, “-shared” option is given to create the shared library with





✅ Correct Answer: 2

Which option of GCC compiler provides the linking with shared libraries?





✅ Correct Answer: 1

After using the shared library, memory can be done free by calling





✅ Correct Answer: 1

Shared libraries are linked with the program





✅ Correct Answer: 2

For a shared library, version number is changed when





✅ Correct Answer: 1

Which command can be used to update the shared library system?





✅ Correct Answer: 2

For debugging with GDB, the file “sanfoundry” can be created with the command





✅ Correct Answer: 1

For debugging with GDB, the compiled program can be run by the command





✅ Correct Answer: 1

In GDB, breakpoints can be set by the command





✅ Correct Answer: 3

GDB stands for





✅ Correct Answer: 1

GDB can be used for





✅ Correct Answer: 3

The command “gdb sanfoundy”





✅ Correct Answer: 1

In debugging with GDB, break points can be set to





✅ Correct Answer: 3

In GDB debugging, we can proceed to the next breakpoint with command





✅ Correct Answer: 2

At the time of debugging with GDB, if we just press ENTER





✅ Correct Answer: 1

To print the value of a variable while debugging with GDB, ______ command can be used.





✅ Correct Answer: 4