1.
The
term “system programming” refers to what?
a.
programming
the operating system
b.
programming
code that makes system calls
c.
programming
the microcode of a computer processor
d.
the
shows that come on the TV channel called “system”
2.
What
is the term for a small integer that is used to specify an open file in a UNIX
program?
a.
file
descriptor
b.
file
pointer
c.
file
label
d.
file
number
Answer: a
3.
Which
of the following is not a file stream opened automatically in a UNIX
program?
a.
standard
input
b.
standard
terminal
c.
standard
error
d.
standard
output
Answer: b
4.
What
is one advantage of using the functions fopen(), fclose(), fread(), fwrite() and fseek() instead of the
corresponding raw system calls?
a.
these
functions have more powerful features
b.
these
functions allow the use of structured datatypes
c.
these
functions are the same on all UNIX systems, while the raw system calls are not
d.
the
code will be more portable between operating systems
Answer: d
5.
Which
of these is not a possible return value for the system call:
write(fd, buffer, 256)?
a.
256
b.
–1
c.
250
d.
260
Answer: d