Unix/Lunux MCQ Quiz Hub

Linux Mcqs Questions Set 9

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

1. What is makefile?




2. What is phony target in the makefile?




3. As we type “make” command on the terminal




4. The makefile starts executing from




5. The command “make sanfoundry” will




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




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




8. 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




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




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




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




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




13. In makefile the comment begins with the character




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




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




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




17. Macros for the makefile can be defined in




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




19. When a target of makefile fails to execute




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




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




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




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




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




25. The command “gcc -S sanfoundry.c” will




26. Which gcc option stops compilation process after preprocessing stage?




27. The -v option of gcc




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




29. The option -fsyntax-only of gcc




30. Which option of gcc inhibit all warning messages?




31. hat is the job of -Werror option in gcc?




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




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




34. The -H option of gcc




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




36. Which option of gcc adds include directory of header files?




37. The -fPIC option of gcc




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




39. Which option of gcc links with a library file?




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




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




42. 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?




43. The -Wextra option of gcc




44. Which gcc option undefines a preprocessor macro?




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




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




47. Which one of the following is not true?




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




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




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