A C project is built with Make using the Makefile below. The developer runs make app, which successfully builds everything, and then edits and saves only the file util.h. Saving util.h gives it a later modification time than the existing object files. No other file changes. Assume all commands succeed and modification times distinguish successive changes.
app: main.o parser.o util.o cc -o app main.o parser.o util.o main.o: main.c parser.h cc -c main.c parser.o: parser.c parser.h util.h cc -c parser.c util.o: util.c util.h cc -c util.c
The developer then runs make app again. How many cc commands does Make execute on this second run? Give your answer as a whole number.
Unlock full course notes by signing up
What a SQL engine may and may not change
A team stores its data in a relational database and retrieves it with SQL queries. Which of the following statements about how the database engine treats their queries are true? Select all that apply.
Evaluating a query with WHERE and HAVING
An online shop records orders in a table called orders, with each amount in dollars:
The shop runs this query:
Give the number of rows the query returns, the total reported for Patel in dollars and the total reported for Lee in dollars, each as a whole number.
Resolving conflicting CSS rules by specificity
CSS is a declarative styling language: a stylesheet declares rules, and the browser's cascade decides which rule wins when several set the same property. A web page has a nav element with id nav. Inside it is a link, an a element, that has two classes, item and active. All five rules below match that link and appear in this source order. There are no inline styles and no !important declarations.
Give each answer as a whole number or a single word: the number of class selectors in rule 2, how many of the five rules contain exactly one ID selector, the number of the rule whose colour is applied, and the colour the link is drawn in.
Counting the answers to Prolog queries
In a logic language such as Prolog you declare facts and rules, and the system searches for every variable binding that makes a query true. Uppercase names are variables, and \= means the two terms must differ. Consider this program:
For each query in the table, enter the total number of answers Prolog reports if you keep asking for more until it says no. Count each reported binding once; enter 0 if the query has no answers.