Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTIONS HELP. WANTS TO KNOW WHETHER I AM WRONG OR NOT THANKS What program is m

ID: 3815236 • Letter: Q

Question

QUESTIONS HELP. WANTS TO KNOW WHETHER I AM WRONG OR NOT THANKS

What program is make?

Question 1 options:

A program for directing the building of programs

A text editor

A linker

A compiler

Question 2

make decides whether to recompile a source file based on the timestamps of that file and the corresponding object file.

Question 2 options:

Question 3

What should precede commands in a makefile?

Question 3 options:

Nothing: commands should start in Column 1

One tab

Eight spaces

Any number of tabs or spaces

Question 4

The special variable $^ used in a makefile's command stands for the list of all dependencies of the current target.

Question 4 options:

Question 5

What is an incomplete type definition in C?

Question 5 options:

A struct definition without any preceeding definition of the struct members

A type definition missing the closing semicolon

The definition of a generic pointer

A type defined with typedef

A

A program for directing the building of programs

B

A text editor

C

A linker

D

A compiler

Explanation / Answer

2. False

Each file has a timestamp that indicates when the file was last modified. make looks at the timestamp of the file, and then the timestamp of the dependencies (which are also files). The idea is this. If the dependencies have changed, then perhaps the target needs to be updated. More precisely, if the dependent files have a more recent timestamp than the target, then the command lines are run. If written correctly, the commands should update the target.

3.one tab

A commands block contains one or more commands, each on its own line. No blank line can appear between the dependency or rule and the commands block. However, a line containing only spaces or tabs can appear; this line is interpreted as a null command, and no error occurs. Blank lines are permitted between command lines.

A command line begins with one or more spaces or tabs.

4.true

The names of all the prerequisites, with spaces between them. For prerequisites which are archive members, only the named member is used (see Archives). A target has only one prerequisite on each other file it depends on, no matter how many times each file is listed as a prerequisite. So if you list a prerequisite more than once for a target, the value of $^ contains just one copy of the name. This list does not contain any of the order-only prerequisites; for those see the ‘$|’ variable, below

5.A struct definition without any preceeding definition of the struct members

1.A linker: In computing, a linker or link editor is a computer program that takes one or more object files generated by a compiler and combines them into a single executable file, library file, or another object file.