Know how to write a simple struct declaration (like the declaration of "struct point" at the beginning of the reading).
Know how to access (read from/write to) the members of a struct.
Accessing a struct's members through a pointer to the struct is
probably even more common than accessing a struct's members
directly. Know how to do this both with and without the structure
pointer operator ("->", also called "arrow"). Also: If you
don't use the arrow operator, are parentheses necessary? In other
words, if pp is a pointer to a structure, is *pp.x okay, or do you need
Know what sizeof does and how to use it on simple types. (Does it work on arrays and structs, too?)
Be able to write (very simple) typedef declarations. (But be aware of the required order in such a statement.)
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 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.)