C

C

C is a general-purpose computer programming language. It was created in the 1970s by Dennis Ritchie, and remains very widely used and influential. By design, C's features cleanly reflect the capabilities of the targeted CPUs. It has found lasting use in operating systems, device drivers, and protocol stacks, but its use in application software has been decreasing. C is commonly used on computer architectures that range from the largest supercomputers to the smallest microcontrollers and embedded systems.

See C on Wikipedia.

Getting started

Here is a Hello, World! program file in C, hello-world.c:

#include<stdio.h>
#include<stdlib.h>

int main() {
  printf("Hello, World!");

  return 0;
}

To compile a C program, use clang:

clang hello-world.c -o hello-world

To run the compiled C program, run:

./hello-world

C screenshot

Screenshot: Hello, World! in C running in the terminal

Keywords

  • c
  • compiled
  • low-level

Back to top