Review Questions for Intermediate C class
Class 1 (C Review)
- What is main?
- What are the 2 steps to go from a .c file to a .exe file?
- What does static mean in front of a local variable?
- What does static mean in front of a function?
- What do break and continue do?
- What is a pointer?
- What is the name of an array?
- If p is a pointer, what's the difference between p[i]=0;
- What do malloc, calloc, realloc, strdup,
and free do?
Class 2 (C Review)
- Describe the difference between malloc and calloc
- realloc has the ability to act like what 2 other functions, based on
- Name and describe at least 5 I/O functions (i.e., fopen)
- Describe the processing differences between a text- and binary-mode
- Can a called function modify a local variable of the calling functions?
- How do you accomplish the above?
- Whats the difference between return and exit?
Class 3 (Structures, recursion)
- Describe Recursion
- How does recursion differ from looping?
- Whats the 'rule of thumb' to determine when to use recursion?
- How do you access a member of structure?
- How do you access the member of a pointer to a structure?
- Can structures contain other structures?
- Can they contain themselves? (Any more details?)
Class 4 (Stacks and Screen Painting)
- What is a stack?
- How would you implement a structure for a stack?
- What is the purpose of each member of the stack structure?
- What are the basic operations of the stack?
- What do C and other languages uses the system stack for?
Class 5 (Reviewed Stack, Field editing/Project)
- What is the purpose of the FIELD structure?
- Describe the meaning of each FIELD member.
- How are the Dest and Label FIELD members initialized?
- How do you create an array of FIELD structures.
- Why would you create an array of FIELD structures?
Class 6 (Queues)
- What is a Queue?
- How would you implement a Queue, using a C struct?
- What is the purpose of each member in the queue struct?
- How does a queue differ from a stack?
- What similarities do the queue and stack share, from a programmers
Class 7 (Linked Lists)
- What is a NODE?
- How does a doubly-linked list differ from a singly-linked list?
- How would you define a NODE struct in C?
- What is the purpose of each data member in the NODE struct?
- How would you iterate through all NODEs in a list?