Unix/Lunux MCQ Quiz Hub

Linux Mcqs Questions Set 9

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

What is makefile?





✅ Correct Answer: 1

What is phony target in the makefile?





✅ Correct Answer: 1

As we type “make” command on the terminal





✅ Correct Answer: 1

The makefile starts executing from





✅ Correct Answer: 3

The command “make sanfoundry” will





✅ Correct Answer: 1

If our makefile is named as “sanfoundry”, then which one of the following command will compile the code with this makefile





✅ Correct Answer: 2

Which option of make command print the commands that would be executed, but do not execute them?





✅ Correct Answer: 2

If we want to get the exit status that specified targets are up to date or not, we have to execute the make command with option





✅ Correct Answer: 1

Which make command option ignores all errors in commands executed to remark files?





✅ Correct Answer: 1

If make command is executed as “make -j 2”, then





✅ Correct Answer: 1

If we want to execute the makefile by just giving the “make” command, makefile should be named as





✅ Correct Answer: 1

Running “make” command without the arguments starts the target ____ in the makefile.





✅ Correct Answer: 3

In makefile the comment begins with the character





✅ Correct Answer: 2

Which one of the following is used for the target filename in the makefile?





✅ Correct Answer: 1

Which one of the following can be used to specify the directory to search the dependencies and target files?





✅ Correct Answer: 1

In the makefile the target and dependencies are separated by the character





✅ Correct Answer: 2

Macros for the makefile can be defined in





✅ Correct Answer: 3

Which one of the following is not a valid makefile directive?





✅ Correct Answer: 4

When a target of makefile fails to execute





✅ Correct Answer: 3

Which one of the following provides all dependencies in the makefile?





✅ Correct Answer: 1

Which one of the following command creates the executable file a.out?





✅ Correct Answer: 2

If we compile the sanfoudry.c file with the command “gcc -o sanfoundry sanfoundry.c”, then the executable file will be





✅ Correct Answer: 2

If we compile the sanfoundry.c file with the command “gcc -c sanfoundry.c”, then the output file will be





✅ Correct Answer: 1

Which gcc option includes debugging info in the generated object code?





✅ Correct Answer: 1

The command “gcc -S sanfoundry.c” will





✅ Correct Answer: 3

Which gcc option stops compilation process after preprocessing stage?





✅ Correct Answer: 3

The -v option of gcc





✅ Correct Answer: 1

Which gcc option turns off certain features of gcc that are incompatible with ISO C89?





✅ Correct Answer: 1

The option -fsyntax-only of gcc





✅ Correct Answer: 1

Which option of gcc inhibit all warning messages?





✅ Correct Answer: 1

hat is the job of -Werror option in gcc?





✅ Correct Answer: 2

The command “as -o sanfoundry.o sanfoundry.s” will





✅ Correct Answer: 1

The command “gcc -save-temps sanfoundry.c” will generate





✅ Correct Answer: 4

The -H option of gcc





✅ Correct Answer: 1

 Which option of gcc enables compiler’s all warning messages?





✅ Correct Answer: 1

Which option of gcc adds include directory of header files?





✅ Correct Answer: 2

The -fPIC option of gcc





✅ Correct Answer: 1

The -shared option of gcc generates shared ______ for shared library.





✅ Correct Answer: 1

Which option of gcc links with a library file?





✅ Correct Answer: 1

Which option of gcc looks in the provided directory for library files?





✅ Correct Answer: 2

The command “cpp sanfoundry.c > sanfoundry.i” will





✅ Correct Answer: 1

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?





✅ Correct Answer: 4

The -Wextra option of gcc





✅ Correct Answer: 3

Which gcc option undefines a preprocessor macro?





✅ Correct Answer: 1

Pipes are used rather than temporary files for communication between the various stages of compilation in gcc when





✅ Correct Answer: 1

The gcc option -Wunused warns when a _____ variable is unused aside from its declaration.





✅ Correct Answer: 1

Which one of the following is not true?





✅ Correct Answer: 1

The command line options of gcc can also be read from a file with





✅ Correct Answer: 3

Which option of the gcc is used to warn is padding is included in structure?





✅ Correct Answer: 1

Which gcc option reports the cpu time taken by each subprocess in the compilation sequence?





✅ Correct Answer: 1