Winter 2025, CSCI 347, Test 1 Review
Test date: Friday, January 31, 2025
Bring your WWU ID card with you to the test.
Quick Review: Chapters 1, and 3 in you text
plus other things talked about in class through
on Monday, January 27, 2025. These topics include the
C language review, history of UNIX, Make and GDB.
Some of these topics are on video lectures.
This review is produced to help you study. This is
not a guarantee that all topics are listed in the
following topic review list.
Topic Review:
- C Language Review
- C preprocessor
- const, void, static modifiers
- pointers
- pointers in parameters
- return of values via pointer parameters
- pointer/array single concept
- dynamic memory
- History of UNIX
- UNIX basic concepts (Chapter 1)
- shells
- file name
- path name
- working directory
- home directory
- Standard files (in, out, err)
- process (ps command)
- pid
- uid
- gid
- System calls and Library functions
- Errors in system calls, perror, strerror
- Review of the C language
- Manual pages, func(n) notation
- chmod and basic permissions
- FILE I/O (Chapter 3)
- File descriptors
- open(2), flags, mode
- creat(2)
- close(2)
- lseek(2), SEEK_SET, SEEK_CUR, SEEK_END
- read(2)
- write(2)
- Kernel process table and fd arrays, open file table
- file sharing: independent opens vs open, fork()
- dup(2), dup2(2)
- fcntl(2)
- ioctl(2)
- Shell basics
- argument lists
- argc/argv
- fork(2)
- execve(2) and related calls
- Make
- Makefile, makefile
- format, comments
- target
- dependencies
- description (commands to execute)
- macros, definitions, use (XYZ=a, $(XYZ))
- Special macros, $@, $?, ...
- Macro string substitution, like ${SRCS:.c=.o}
- @ at beginning of command
- GDB
- gcc -g ...
- basic commands (step, next, quit, ...)
- run args ...
- break points
- break on conditional
- printing data
- identifying where a segmentation fault happens
- how to debug infinite loops
Example multiple choice question.
X. (3 points) Your ``home directory'' in UNIX is
- similar to ``my computer'' on a Windows OS.
- the first working directory you have after login.
- always the starting point for relative file names.
- the main directory for the system.
Y. (n points) Describe command line arguments and how they
get to main() in a program run from a shell.
Last modified: January 28, 2025