1.
What
must be the first character on every command line in a Makefile?
a.
space
b.
pound
(#)
c.
tab
d.
dollar
sign ($)
answer: c
2.
What
is the default filename of an executable file produced by gcc?
a. a.out
b. program
c. run.bat
d. a.exe
answer: a
3.
What
option should be added to a gcc command in order to link in functions from a
library called liboutput.a?
a.
–lliboutput
b.
–l output
c.
–Loutput
d.
-loutput
answer: d
4.
What
is the –c option used for in gcc?
a.
compiling
multiple files into a single executable file
b.
creating
an object file from a source file
c.
specifying
the directory where code resides
d.
specifying
that the language used is C
answer: b
5.
Why
should you use macros (variables) in a Makefile?
a.
a
single change to a macro can have a large effect on the way a target is built
b.
macros
can be used to override some of make’s defaults
c.
correct
use of macros allow a Makefile meant for one purpose to be easily converted for
use in another context
d.
all
of the above
answer: d