Jump to content

C (programming language)

From Simple English Wikipedia, the free encyclopedia
Revision as of 15:00, 7 February 2022 by 5.67.29.63 (talk) (Edited and improved)
C programming language logo

I Like your tasty daddy i suck him

C standards

There are three successive standards for the C programming language ANSI C, ISO C and Standard C which are published by the American National Standards Institute(ANSI) and the International Organization for Standardization(ISO).

C is available for many different types of computers. This is why C is called a "portable" language. A program that is written in C and that respects certain limitations can be compiled for many different platforms.

The syntax of C has also influenced many other programming languages, such as C++, C#, and Java, and many more programming languages we use nowadays.

Example code

Here is an example of a program written in C. When built and run it will show "Hello world!", followed by a new line on the computer screen.

#include <stdio.h>

int main() {
    printf("Hello world!\n");
    return 0;
}
  • #include <stdio.h> gets the standard input/output tools ready for the program to use. This allows text to be displayed (output).
  • int main() is called the main function, and it is where the first code starts being run in a C program.
  • printf("Hello world!\n"); is what displays text, in this case "Hello world!" with a new line (\n) at the end.
  • return 0; tells the computer that the program finished and did not run into problems.h

Other websites