Day 2 Recap Questions
  1. The command to compile a C program is gcc <source file> -std=c99 -pedantic -Wall -Wextra. Use man or Google to find out the meaning of the four flags, i.e. -std=c99, -pedantic, -Wall and -Wextra.
  2. Once you’ve compiled a C program using the previous command line instruction, how do you run it?
  3. Briefly describe what a preprocessor, compiler and linker do when transporting C code into executable?
  4. What does it mean when a C program ends with the statement return 0;?
  5. Why do we use the directive #include <stdio.h>?
  6. In the context of using printf, what are format specifiers? How do we use them? What are some of the most common specifiers?
  7. What function from stdio.h can we use to read input? What special symbol do we use in front of the variable argument to this function? What is the return value of this function?
  8. What does an undefined behavior mean in programming? Do we need to care about it? Why or why not?
  9. What does the modifier const mean?
  10. What are the primitive types in C and what are their byte sizes?
  11. What is the value of 7 / 2 (a division of two integers) in a C program?