Differences between revisions 2 and 5 (spanning 3 versions)
Revision 2 as of 2022-12-31 03:25:25
Size: 857
Comment:
Revision 5 as of 2023-04-04 16:04:53
Size: 1423
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
A statically typed programming language. The design goals were minimalism and mirroring bare metal computer architecture, so as to simplify the process of porting C to new platforms. It allows low-level memory management and features a very concise standard library. '''C''' is a statically-typed programming language. The design goals were minimalism and mirroring bare metal computer architecture, so as to simplify the process of porting C to new platforms. It allows low-level memory management and features a very concise standard library.
Line 8: Line 8:

Line 32: Line 34:
== History == == Installation ==
Line 34: Line 36:
C was developed by Dennis Ritchie at Bell Labs. A C compiler must be installed. Many [[Linux]] and [[BSD]] distributions will have one installed: either `gcc(1)` or `clang(1)`. All distributions will have packages for both available as well.
Line 36: Line 38:
A C standard was developed as '''ANSI C''' in 1989. While the standard itself continued to develop, today 'ANSI C' refers almost exclusively to the standard of that time. Alternatively it is known as '''C89'''. A C library (`libc(7)`) must also be installed. All distributions will have one installed. BSD distributions develop their own libraries, while most Linux distributions use `glibc`. Minimal Linux distributions such as [[Linux/Alpine|Alpine]] use `musl libc`.

----



== Tool Chain ==

 + [[C/BuildFlags]]



== Language ==

 * [[C/ANSISequences|ANSI sequences]]

----



== See also ==

[[https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html|GNU C user manual]]

[[https://man.archlinux.org/man/gcc.1|gcc(1)]]

[[https://man.archlinux.org/man/extra/clang/clang.1.en|clang(1)]]

C

C is a statically-typed programming language. The design goals were minimalism and mirroring bare metal computer architecture, so as to simplify the process of porting C to new platforms. It allows low-level memory management and features a very concise standard library.


Example

A hello world program will look like:

#include <stdio.h>
int main() {
    printf("Hello World!\n");
    return 0;
}

To compile and run, try:

gcc -o hello hello.c
./hello


Installation

A C compiler must be installed. Many Linux and BSD distributions will have one installed: either gcc(1) or clang(1). All distributions will have packages for both available as well.

A C library (libc(7)) must also be installed. All distributions will have one installed. BSD distributions develop their own libraries, while most Linux distributions use glibc. Minimal Linux distributions such as Alpine use musl libc.


Tool Chain

Language


See also

GNU C user manual

gcc(1)

clang(1)


CategoryRicottone

C (last edited 2023-04-05 17:52:44 by DominicRicottone)