- Argc and Argv
- Binary Trees
- Bit Manipulation
- Debugging
- Doubly Linked Lists
- Dynamic Libraries
- File Input and Output
- First Day Of C
- Function Pointers
- Functions and Nested Loops: I
- Functions and Nested Loops: II
- Hash Tables
- Hello World
- MakeFile
- Malloc and Free: I
- Malloc and Free: II
- Pointers, Arrays and Strings: I
- Pointers, Arrays and Strings: II
- Pointers, Arrays and Strings: III
- Preprocessor
- Printf
- Recursion
- Search Algorithms
- Simple Shell
- Singly Linked Lists: I
- Singly Linked Lists: II
- Sorting Algorithms
- Stacks, Queues: LIFO and FIFO
- Static Libraries
- Structures and Typedef
- Variables, If, Else and While
- Variadic Functions
For this project, we expect you to look at these concepts:
Read or watch:
- Everything you need to know to start with C.pdf (You do not have to learn everything in there yet, but make sure you read it entirely first)
- Dennis Ritchie
- “C” Programming Language: Brian Kernighan
- Why C Programming Is Awesome
- Learning to program in C part 1
- Learning to program in C part 2
- Understanding C program Compilation Process
- Betty Coding Style
- Hash-bang under the hood (Look at only after you finish consuming the other resources)
- Linus Torvalds on C vs. C++ (Look at only after you finish consuming the other resources)
gcc
printf (3)
puts
putchar
At the end of this project, you are expected to be able to explain to anyone, without the help of Google:
- Why C programming is awesome
- 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 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
- Allowed editors:
vi
,vim
,emacs
- All your files will be compiled on Ubuntu 20.04 LTS using
gcc
, using the options-Wall -Werror -Wextra -pedantic -std=gnu89
- All your files should end with a new line
- A
README.md
file at the root of the repo, containing a description of the repository - A
README.md
file, at the root of the folder of this project, containing a description of the project - There should be no errors and no warnings during compilation
- You are not allowed to use
system
- Your code should use the
Betty
style. It will be checked using betty-style.pl and betty-doc.pl
- Allowed editors:
vi
,vim
,emacs
- All your scripts will be tested on Ubuntu 20.04 LTS
- All your scripts should be exactly two lines long (
$ wc -l file
should print 2) - All your files should end with a new line
- The first line of all your files should be exactly
#!/bin/bash
mkdir Betty && cd Betty
git clone https://github.com/holbertonschool/Betty.git
cd Betty
sudo ./install.sh
Put this inside betty
file
Or
echo '#!/bin/bash
# Simply a wrapper script to keep you from having to use betty-style
# and betty-doc separately on every item.
# Originally by Tim Britton (@wintermanc3r), multiargument added by
# Larry Madeo (@hillmonkey)
BIN_PATH="/usr/local/bin"
BETTY_STYLE="betty-style"
BETTY_DOC="betty-doc"
if [ "$#" = "0" ]; then
echo "No arguments passed."
exit 1
fi
for argument in "$@" ; do
echo -e "\n========== $argument =========="
${BIN_PATH}/${BETTY_STYLE} "$argument"
${BIN_PATH}/${BETTY_DOC} "$argument"
done' > betty
chmod u+x betty
sudo mv betty /bin/
To check style:
betty filename.c