Skip to content
/ C Public

My journey through the C programming language

Notifications You must be signed in to change notification settings

CesarJZO/C

Repository files navigation

~/C

Here I'll document my journey through C language. In Documentation is the syntax, commands and other stuff that may need to be remembered. In Programs are some tests for some exercises or other things.

Getting started

The first think you'd like to do is a hello world program, you can check mine in the helloworld.c file, but the least you need to run a C program is a main() function. Make, for example a file whose name ends in .c, such as hello.c

#include <stdio.h> // Include information about standard library

main()         // Define a function named main
{                  // Statements are enclosed in braces
                            // main calls library function printf
  printf("hello, world\n"); // to print this sequence of characters;
                            // \n represents the new line character
}

This example comes from The C Programming Language book

Whether any operating system you are using or your text editor, you need a compiler, and you can find instructions about it in Compiling, but if you have it already installed, just use the gcc command

gcc hello.c

It will generate an a.out file, to execute it use this command

./a.out

Or a.exe on Windows

.\a.exe

Documentation

Programs

Sources

About

My journey through the C programming language

Topics

Resources

Stars

Watchers

Forks

Languages