From WikiChip
Difference between revisions of "c"

(standard library)
("It is" contracts to it's; its is the possessive form of it.)
 
(26 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''C''' is a [[general-purpose programming language|general-purpose]], [[procedural programming paradigm|procedural]], [[imperative programming paradigm|imperative]], [[high-level programming language|high-level]] [[programming language]] developed by [[Dennis Ritchie]] at AT&T Bell Labs between 1969 and 1973.
+
{{title|C Programming Language}}
 +
'''C''' is a [[general-purpose programming language|general-purpose]], [[procedural programming paradigm|procedural]], [[programming language]] originated in Bell Labs and introduced in the early 1970s. C is known for its very simple design, small number of {{\|reserved keywords|keywords}} and core constructs, and a very simple but still capable {{\|standard library}}. By design, C makes very few assumptions about the underlining mechanism that implements the language. It's this precise simplicity and abstraction that allowed various system designers to support C on their architectures. Today, support for the C language can be found on virtually all hardware.
  
 
== History ==
 
== History ==
 +
The C programming language was developed at AT&T Bell Labs, between 1969 and 1973, by Dennis Ritchie. The language got its name, '''C''', due to its influence from the ''B'' programming language; B was another language which developed at Bell Labs, by Ken Thompson and Dennis Ritchie, as well as the ''BCPL'' programming language.
  
The C programming language was developed at AT&T Bell Labs between 1969 and 1973 by Dennis Ritchie. It was named "C" due to it's influence from the "B" programming language, another language developed at Bell Labs by Ken Thompson and Dennis Ritchie, as well as the BCPL programming language.  
+
C is actually a byproduct of the [[UNIX]] operating system, which was developed at AT&T Bell Labs around the same time as well. The UNIX operating system ran on a [[DEC PDP-7]] machine. UNIX was originally written in assembly language, like most programs and operating systems of the time. Debugging code written in assembly was difficult and slow. Ken Thompson, the author of UNIX, decided that a high-level language was more appropriate. A small language, by the name of B, was then designed.  
  
C is actually a by-product of an operating system called UNIX which was developed at AT&T Bell Labs at that time as well. The operating system ran on a DEC PDP-7 machine. UNIX was originally written in assembly language like most programs of the time. Debugging was difficult and slow. Ken Thompson, the author of UNIX, decided a high-level was more appropriate.
+
B was heavily influenced by another system programming language called BCPL, which was developed in the mid 1960's. In the early 1970's, a [[DEC PDP-11]] machine was acquired for the UNIX project. Large portions of UNIX were ported to B, with the help of Dennis Ritchie. By 1971, it became clear that B did not serve as well for the PDP-11 as it did for the PDP-7. Constant modifications of the B language lead to the development of a new language which, eventually, came to be known as C. By 1973, C was complete enough that UNIX could be entirely written in the language. By writing UNIX in C, to allow UNIX to work on other machines, all that had to be done was to simply have a compiler for the new target system. Eliminating the need to rewrite the OS every time.
 
 
A small language by the name of B was designed. B was heavily influenced by another system programming language called BCPL which was developed in the mid 60s. In the early 70s, a DEC PDP-11 machine was acquired for the UNIX project. Large protions of UNIX were ported to B with the help of Ritchie. By 71 it became clear that B did not serve well for the PDP-11 as it did for the PDP-7. Constant modification of the B language, lead to a development of a new language that eventually became to be known as C. By 1973 C was complete enough that UNIX could be entirely written in C. By writing UNIX in C, all they had to do is have a compiler for a specific machine and be able to run UNIX on it.
 
  
 
== Standards ==
 
== Standards ==
 +
For many years, the only authoritative reference on C was the first edition of [[The C Programming Language]]. In 1983, the [[American National Standards Institute]] (ANSI) established a committee, known as X3J11, to formally describe the C language. In 1989, the C standard was ratified as [[ANSI X3.159-1989]]. This new version of C is largely referred to as [[ANSI C]] or '''[[C89]]'''. In 1990, the ANSI C standard was adopted by the International Organization for Standardization (ISO) as ISO/IEC 9899:1990; this version is called C90. Both C89 and C90 refer to the same exact language.
  
For many years, the only authoritative reference on C was the first edition of [[The C Programming Language]]. In 1983, the [[American National Standards Institute]] (ANSI) established a committee to formally describe the C language. In 1989, the C standard was ratified as [[ANSI X3.159-1989]]. That version is largely referred to as [[ANSI C]] or '''[[C89]]'''. In 1990, the ANSI C standard was adopted by the International Organization for Standardization (ISO) as ISO/IEC 9899:1990. That version is called C90. Both C89 and C90 refer to the same exact language.
+
<h3 style="font-size: 14px; color: #212121; border-bottom: 1px dashed #C9C9C9; padding-bottom: 5px; width: 60%;">Modifications to The Standard</h3>
 +
* 1995: Normative Addendum 1 was published to support international character sets. The term C94 or '''[[C95]]''' are used to refer to the [[Normative Addendum 1|C89 plus Amendment 1]].
 +
* 1999: A new standard was published, known as ISO/IEC 9899:1999; this standard is often referred to as '''[[C99]]'''.
 +
* 2004: The WG14 group published the first technical report for {{C|Embedded|Embedded C}}. The second revision of the technical report was published in 2008.
 +
* 2011: ISO published a new standard known as ISO/IEC 9899:2011; this standard is the current standard of the C language and is referred to as '''[[C11]]'''.
  
In 1995 Normative Addendum 1 was published to support international character sets. The term C94 or '''[[C95]]''' are used to refer to the [[C89 plus Amendment 1]].
+
== Standard library ==
 
+
{{main|standard library|c/standard library|l2=C Standard Library}}
In 1999 A new standard was published known as ISO/IEC 9899:1999. This standard is often referred to as '''[[C99]]'''.
+
The C language provides a set of functions for performing common tasks, such as: string handling, threading managements, memory management, and I/O  processing; this set of functions is called the '''{{C|standard library|C Standard Library}}'''. The library is broken down into 29 headers, 3 of which are optional.
  
In 2011 ISO published a new standard known as ISO/IEC 9899:2011. This standard is the current standard of the C language and is referred to as '''[[C11]]'''.
+
== Topics ==
 +
{{collist
 +
| count = 2
 +
|
 +
* C
 +
** {{C|Introduction}}
 +
** {{C|Program structure}}
 +
* Basics
 +
** {{C|Variables}}
 +
** {{C|Basic I/O}}
 +
* Math
 +
** {{C|Basic Arithmetics}}
 +
** {{C|Math functions}}
 +
** {{C|Complex Numbers}}
 +
* Control Structures
 +
** {{C|Conditional statements|If Statements}}
 +
** {{C|Loop Constructs}}
 +
** {{C|Goto Statements}}
 +
** {{C|Nonlocal Jumps}}
 +
** {{C|Functions}}
 +
** {{C|Error Handling}}
 +
* Operators
 +
** {{C|Operators}}
 +
** {{C|Operator precedence and associativity|Operator Precedence}}
 +
* Arrays & Pointers
 +
** {{C|Arrays}}
 +
** {{C|Pointers}}
 +
** {{C|Memory management}}
 +
* Strings
 +
** {{C|Character Handling}}
 +
** {{C|Strings Handling}}
 +
** {{C|Wide Strings}}
 +
** {{C|Unicode}}
 +
* Date and Time
 +
** {{C|Date and Time}}
 +
* Structured Types
 +
** {{C|Structures}}
 +
** {{C|Unions}}
 +
** {{C|Bitfields}}
 +
** {{C|Enumerated types|Enums}}
 +
* I/O
 +
** {{C|Standard Streams}}
 +
** {{C|File I/O}}
 +
* Concurrency
 +
** {{C|Concurrency}}
 +
** {{C|Inter‐Thread Communication}}
 +
* Other
 +
** {{C|Data Types}}
 +
** {{C|Static Assertions}}
 +
** {{C|Generic Selection}}
 +
** {{C|Standard Library}}
 +
** {{C|Reserved Keywords}}
 +
* {{C|Preprocessor}}
 +
** {{C|Standard predefined macros}}
 +
}}
  
== Standard library ==
+
[[Category:C programming language]]
{{main|C standard library}}
 
The C language provides a set of functions for performing common tasks such as string handling, threading managements, memory management, and I/O  processing called the '''[[C standard library]]'''. The library is broken down into 29 headers, 3 of which are optional.
 

Latest revision as of 13:36, 2 October 2017

C is a general-purpose, procedural, programming language originated in Bell Labs and introduced in the early 1970s. C is known for its very simple design, small number of keywords and core constructs, and a very simple but still capable standard library. By design, C makes very few assumptions about the underlining mechanism that implements the language. It's this precise simplicity and abstraction that allowed various system designers to support C on their architectures. Today, support for the C language can be found on virtually all hardware.

History[edit]

The C programming language was developed at AT&T Bell Labs, between 1969 and 1973, by Dennis Ritchie. The language got its name, C, due to its influence from the B programming language; B was another language which developed at Bell Labs, by Ken Thompson and Dennis Ritchie, as well as the BCPL programming language.

C is actually a byproduct of the UNIX operating system, which was developed at AT&T Bell Labs around the same time as well. The UNIX operating system ran on a DEC PDP-7 machine. UNIX was originally written in assembly language, like most programs and operating systems of the time. Debugging code written in assembly was difficult and slow. Ken Thompson, the author of UNIX, decided that a high-level language was more appropriate. A small language, by the name of B, was then designed.

B was heavily influenced by another system programming language called BCPL, which was developed in the mid 1960's. In the early 1970's, a DEC PDP-11 machine was acquired for the UNIX project. Large portions of UNIX were ported to B, with the help of Dennis Ritchie. By 1971, it became clear that B did not serve as well for the PDP-11 as it did for the PDP-7. Constant modifications of the B language lead to the development of a new language which, eventually, came to be known as C. By 1973, C was complete enough that UNIX could be entirely written in the language. By writing UNIX in C, to allow UNIX to work on other machines, all that had to be done was to simply have a compiler for the new target system. Eliminating the need to rewrite the OS every time.

Standards[edit]

For many years, the only authoritative reference on C was the first edition of The C Programming Language. In 1983, the American National Standards Institute (ANSI) established a committee, known as X3J11, to formally describe the C language. In 1989, the C standard was ratified as ANSI X3.159-1989. This new version of C is largely referred to as ANSI C or C89. In 1990, the ANSI C standard was adopted by the International Organization for Standardization (ISO) as ISO/IEC 9899:1990; this version is called C90. Both C89 and C90 refer to the same exact language.

Modifications to The Standard

  • 1995: Normative Addendum 1 was published to support international character sets. The term C94 or C95 are used to refer to the C89 plus Amendment 1.
  • 1999: A new standard was published, known as ISO/IEC 9899:1999; this standard is often referred to as C99.
  • 2004: The WG14 group published the first technical report for Embedded C. The second revision of the technical report was published in 2008.
  • 2011: ISO published a new standard known as ISO/IEC 9899:2011; this standard is the current standard of the C language and is referred to as C11.

Standard library[edit]

Main articles: standard library and C Standard Library

The C language provides a set of functions for performing common tasks, such as: string handling, threading managements, memory management, and I/O processing; this set of functions is called the C Standard Library. The library is broken down into 29 headers, 3 of which are optional.

Topics[edit]