Difference between revisions of "C programming language"
From Computer History Wiki
m (→Ext links: +Ritchie paper) |
m (refactor, add HTML verson of C History paper) |
||
| Line 1: | Line 1: | ||
| − | The C language.. | + | The '''C programming language''' was derived from an earlier language called [[B programming language|B]]. There was a short-lived intermediary language called NB, or New B. |
| + | |||
| + | A number of object-oriented languages have been influenced by C, including | ||
| + | [[Objective-C]], [[C++]], [[D]], [[Vala]]. | ||
== Dialects == | == Dialects == | ||
| Line 6: | Line 9: | ||
The C language evolved continuously starting in 1972. Some milestones: | The C language evolved continuously starting in 1972. Some milestones: | ||
| − | * 1972 - | + | * 1972 - Primeval C - no '''struct''', automatic variables can't be initialized. |
* 1973 - preprocessor added. | * 1973 - preprocessor added. | ||
* 1976? - [[Typesetter C]] - introduced '''long''', '''unsigned''', '''typedef''', '''union''', and changed '''=+''' etc to '''+='''. | * 1976? - [[Typesetter C]] - introduced '''long''', '''unsigned''', '''typedef''', '''union''', and changed '''=+''' etc to '''+='''. | ||
| Line 49: | Line 52: | ||
} | } | ||
</pre> | </pre> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
==See also== | ==See also== | ||
| − | |||
* [[PDP-11 C stack operation]] | * [[PDP-11 C stack operation]] | ||
==External links== | ==External links== | ||
| − | * [https://www.bell-labs.com/usr/dmr/www/chist.pdf | + | * The Development of the C Language - Ritchie paper with details of the early evolution |
| + | ** [https://www.bell-labs.com/usr/dmr/www/chist.html HTML version] | ||
| + | ** [https://www.bell-labs.com/usr/dmr/www/chist.pdf PDF version] | ||
| + | * [https://www.bell-labs.com/usr/dmr/www/primevalC.html Primeval C] - Ritchie notes on some software archaeology | ||
{{semi-stub}} | {{semi-stub}} | ||
[[Category: C Language]] | [[Category: C Language]] | ||
Revision as of 15:03, 19 August 2021
The C programming language was derived from an earlier language called B. There was a short-lived intermediary language called NB, or New B.
A number of object-oriented languages have been influenced by C, including Objective-C, C++, D, Vala.
Dialects
There are two popular dialects, the original was K&R C, which spread with the original C compiler, and pcc, the portable C compiler. Later there was a ANSI standard to the C language, and it's usually refered to as just ANSI C.
The C language evolved continuously starting in 1972. Some milestones:
- 1972 - Primeval C - no struct, automatic variables can't be initialized.
- 1973 - preprocessor added.
- 1976? - Typesetter C - introduced long, unsigned, typedef, union, and changed =+ etc to +=.
- 1978 - K&R C
- 1989 - ANSI C
hello world
Ancient
char *hello "hello"; /* No = for initialization. */
main (argc, argv)
int argc; /* Parameter declarations as in K&R. */
char **argv;
{
char *world; /* Auto variables can't be initialized. */
world = "world";
cprint ("%s %s\n", hello, world); /* No stdio yet. */
}
K&R
#include <stdio.h>
main(argc,argv)
int argc;
char **argv;
{
printf("Hello World\n");
exit (0);
}
ANSI C
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello World\n");
return 0;
}
See also
External links
- The Development of the C Language - Ritchie paper with details of the early evolution
- Primeval C - Ritchie notes on some software archaeology