Skip to content

BenoitMain/holbertonschool-low_level_programming

Repository files navigation

C Programming Fundamentals 💻

Resources 📚

man or help:

  • gcc 🛠️
  • printf (3) 🖨️
  • puts 📝
  • putchar 🔤

Learning Objectives 🎯

At the end of this project, you are expected to be able to explain to anyone, without the help of Google:

  • General
    • 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 🔄

Requirements 📜

  • C

    • 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 💅
  • Shell Scripts

    • 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 📜

More Info 📌

  • Betty linter

    To run the Betty linter just with command betty <filename>:

    1. Go to the [Betty repository](Link to Betty repo - Replace with actual link) 🔗
    2. Clone the repo to your local machine 💻
    3. cd into the Betty directory 📁
    4. Install the linter with sudo ./install.sh 🛠️
    5. emacs or vi a new file called betty, and copy the script below:
    #!/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
    1. Once saved, exit file and change permissions to apply to all users with chmod a+x betty 🔒
    2. Move the betty file into /bin/ directory or somewhere else in your $PATH with sudo mv betty /bin/ 📁
    3. You can now type betty <filename> to run the Betty linter! 💅

Manual QA Review 🔍

It is your responsibility to request a review for your blog from a peer before the project’s deadline. If no peers have been reviewed, you should request a review from a TA or staff member.

About

C - Hello, World

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published