- Define the terms macro, function call, and system
call. Tell what features of each contributes to its execution
time.
- Tell what the setenv command does. Tell what the getenv()
function does. Name three different environment variables that
you have encountered this term, and tell what each is used for.
- List in order the programs that may be invoked by a compiler
driver such as g++ and tell what operation is performed
by each program. Describe these operations by telling what information
is in the files that are read by the program and what information
is in the files that are written by the program.
- For this question, assume that all the C programs involved
are "simple" in the sense that they do not make calls
to functions defined in any library other than the standard C
library. Draw a box around each Makefile, and label the boxes
"1" and "2."
- Write the simplest Makefile possible that would allow a
C program named x to be built from a source file
named x.c when a user types the command make with
no command line arguments.
- Write a Makefile that would cause the command "make
x" to build a program from two source files, a.c
and b.c, both of which include a header file named b.h.
The same Makefile also causes the files x, a.o, and
b.o to be deleted if the user types "make clean."
- Assume a program named x contains a function named
func_a() which contains a statement, "my_value
= this_value * that_value;" Tell exactly how to use
gdb to look at the values of each of the three variables
immediately after this statement is executed. Include in your
answer all of these pieces of information: How to compile the
program so it can be used with gdb; How to invoke gdb to
debug the program; How to get execution to reach the statement
in question as efficiently as possible; How to display the values
of the variables.
-
- What mechanism of the Unix file system does make
use to determine whether one file is "newer" than another
one?
- What mechanism of the Unix file system does sccs
use to prevent a person from editing a file obtained by means
of an sccs get command?
- How many users can edit a Unix file simultaneously if there
is no project management system like sccs in effect? How
many users can simultaneously edit a file that is under sccs
management? How does sccs keep track of the number of users
who are editing a file under its management?
- Define sccs keywords, give an example of an sccs
keyword, and tell what that particular keyword is used for.
- What is the purpose of an sccs history file, what
is its name, and what information is kept in it.
- What is a delta?
- Give function prototypes for fork() and execve(),
document each argument and return value, and tell what each function
does.
Christopher Vickery
Queens College of CUNY
Home Page