a) makefile describes to the make command that how to compile the program
b) makefile contains various statements related with the compilation of target
c) makefile contains various statements
d) none of the mentioned
Answer: a
Clarification: None.
2. What is phony target in the makefile?
a) the target which is not a filename
b) the target which is a filename
c) the target which does not used for compilation
d) none of the mentioned
Answer: a
Clarification: None.
3. As we type “make” command on the terminal
a) make reads the makefile in the current directory
b) make reads the makefile in the parent directory
c) make reads the makefile in the predefined environment variable
d) none of the mentioned
Answer: a
Clarification: None.
4. The makefile starts executing from
a) first target
b) first target whose name starts with “.”
c) first target whose name does not starts with “.”
d) none of the mentioned
Answer: c
Clarification: None.
5. The command “make ” will
a) create the executable if .c file is present in the current directory
b) create the object file named as .o
c) give an error
d) none of the mentioned
Answer: a
Clarification: None.
6. If our makefile is named as “”, then which one of the following command will compile the code with this makefile
a) make -a
b) make -f
c) make sanfoudry
d) make
Answer: b
Clarification: None.
7. Which option of make command print the commands that would be executed, but do not execute them?
a) -m
b) -n
c) -o
c) -p
Answer: b
Clarification: None.
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
a) -q
b) -r
c) -s
d) -t
Answer: a
Clarification: None.
9. Which make command option ignores all errors in commands executed to remark files?
a) -i
b) -j
c) -k
d) -l
Answer: a
Clarification: None.
10. If make command is executed as “make -j 2”, then
a) two jobs will run simultaneously
b) only two will be executed
c) it will give an error
d) none of the mentioned
Answer: a