Questions 1
- What is the
main
function?
- What is compilation and linking (of a C-program)? What is source
code, object code, executable code?
-
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?
- 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?
- What is
stdio.h
? Why angle-brackets in #include<stdio.h>
? Hint:
C preprocessor: including files.
- How can you get the description of the C standard library
function
printf
? Hint: there is also a utility
printf
in a POSIX system.
- What are the built-in data types for numbers in the C-language?
- What is the result of the operation
1/2
in C?
- Can a C-compiler work with an undeclared variable? An undeclared
function? Can a variable hold values of different types in
the C-language?
- In order to use C mathematical functions, do you need to
include any header files? Link any library? Hint:
man sin
.
- What is
tgmath.h
? If you use tgmath.h
do you need to link any library?
-
What is the
pow
function? Is there a complex
cpow
function in your system? Hint: man -k cpow