0x00. C - Hello, World
- Why C programming is awesome (don’t forget to tweet today, with the hashtag #cisfun :))
- Who invented C
- Who are Dennis Ritchie, Brian Kernighan and Linus Torvalds
- What happens when you type
gcc main.c
- What is an entry point
- What is
main
- How to print text using
printf
, puts
and putchar
- How to get the size of a specific type using the unary operator
sizeof
- How to compile using
gcc
- What is the default program name when compiling with
gcc
- What is the official Holberton C coding style and how to check your code with
betty-style
- How to find the right header to include in your source code when using a standard library function
- How does the
main
function influence the return value of the program
Exercises
##0-preprocessor
Write a script that runs a C file through the preprocessor and save the result into another file.
- The C file name will be saved in the variable $CFILE
- The output should be saved in the file c
1-Compiler
Write a script that compiles a C file but does not link.
-The C file name will be saved in the variable $CFILE
-The output file should be named the same as the C file, but with the extension .o instead of .c.
- Example: if the C file is main.c, the output file should be main.o
2-assembler