Understand the basics of input and output redirection as described in the reading, including what ">", "<", and "|" do.
Be able to write simple scanf statements to read things like ints, floats, and strings. Important: How can scanf save what it reads into your variables if all function calls in C are pass by value? Does this work the same for scanf reading into ints as it does for reading into strings? (Even more important: If you handle this wrong, bad things can happen.)
What is sprintf? What is the simple change required to turn a printf statement into an analogous sprintf statement? (Note: In my experience, sprintf is very useful.)
Is there something similar for scanf?
Be able to fill in the blanks below so that the word "test" is written into the file "test.txt", and understand the purpose of each line.
____ *fp; /* Declare the file pointer. */
fp = fopen(____, ____); /* Open the file for writing. */
fprintf(____, "test\n"); /* Write the text to the file. */
____(fp); /* Close the file. */
Understand how fprintf is useful in error handling. (What can it do that printf can't?) Also, how can you rewrite any printf call as a call to fprintf?
What does "exit" do, and why is it necessary? (What can it do that returning from main cannot?)
What does "system" do? (Note: In my opinion, system is also very useful.)
Understand the basics of malloc and calloc, including what they do and how they differ. How is "sizeof" commonly used in calloc calls? "free" is used to undo the work of malloc; is "free" used in the same way with respect to calloc?
Know how to use rand() to write an expression that produces a random integer between 1 and 10 (inclusive). (Note: You'll probably need to use "%" and "+", and your first guess may not be correct.)