Log in / create account | Login with OpenID
DocForge
An Open Wiki For Software Developers

C

From DocForge

This page is a stub. It's lacking in details and can use your help. Please contribute your knowledge to this page.

Contents

Overview [edit]

C is an imperative general purpose programming language which was created by Brian Kernighan[citation needed] and Dennis Ritchie to aid in the implementation of the Unix operating system. The language was first standardised by ANSI in 1989 (frequently referred to as C89) and again standardised in 1999 (frequently referred to as C99). C language implementations are usually compiled rather than interpreted, but the ANSI specification of the language does not force an implementation to be compiled. Likewise, the standard differentiates between a standalone implementation and a hosted implementation.

The C language is typically used for systems programming (operating system-kernels and drivers, utilities and services) but is also relatively popular as an application programming language. The language has enjoyed much success in microcontroller applications due to the portability of the language and the availability of standalone implementations for devices with as little as 32k of memory.

Characteristics [edit]

Hello World [edit]

A simple Hello World program looks like this.

#include <stdio.h> /* includes prototypes for IO functions */
 
/* 
This is the standard entry function, main.
The function parameters are optional - the first is an integer holding 
the number of arguments that the program was called with. 
The second is an array of strings, holding the arguments.
The main() function should return an integer in standard c. 
Normally, returning 0 indicates success. Returning non-zero indicates some error. 
*/
int main(int argc, char** argv) {
    puts("Hello world"); /* prints 'Hello World' and a newline to standard output */
    return 0; /* indicate success */
}

ANSI header files [edit]

Standard headers C94/95 C99

Descendants [edit]

C has been the foundation for many languages and the inspiration for the syntax found in many modern languages as well. C syntax has found it's way into C++, Java and PHP, amongst others. As such, the descendants of C are too numerous to list exhaustively. The notable ones are:

Retrieved from "http://docforge.com/wiki/C"