Questions 1

  1. What is the main function?
  2. What is compilation and linking (of a C-program)? What is source code, object code, executable code?
  3. How can you compile and link a C-program which is wholly contained in one file, say hello.c? How do you run the resulting executable code?
  4. How do you supply the compiler with the description of the printf function? Why do you need to do this? How do you link the printf function?
  5. What is stdio.h? Why angle-brackets in #include<stdio.h>? Hint: C preprocessor: including files.
  6. How can you get the manual page of the C standard library function printf? Hint: there is also a utility printf in a POSIX system and man printf will show you the manual page for the printf utility, not the printf function from the C standard library.
  7. What are the built-in data types for numbers in the C-language?
  8. What is the result of the operation 1/2 in C?
  9. Can a C-compiler work with an undeclared variable? An undeclared function? Can a variable hold values of different types in the C-language?
  10. In order to use the C mathematical functions, do you need to include any header files? Link any library? Hint: man sin.
  11. What is tgmath.h? If you use tgmath.h do you need to link any library?
  12. What is the pow function? Is there a complex cpow function in your system? Hint: man -k cpow