C is an imperative (procedural) systems implementation language. It was designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal run-time support. C was therefore useful for many applications that had formerly been coded in assembly language. from http://en.wikipedia.org/wiki/C_(programming_language)
C (pronounced "See", like the letter C) is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the UNIX operating system. Its design provides constructs that map efficiently to typical machine instructions, and therefore it found lasting use in applications that had formerly been coded in assembly language. It is highly efficient procedural oriented programming language, has emphasis on functions whereas latest object oriented programming languages having emphasis on data.
Although C was designed for implementing system software, it is also widely used for developing portable application software.
C is one of the most widely used programming languages of all time and there are very few computer architectures for which a C compiler does not exist. C has greatly influenced many other popular programming languages, most notably c++, which began as an extension to C.
Design
C is an imperative (procedural) systems implementation language. It was designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal run-time support. C was therefore useful for many applications that had formerly been coded in assembly language.
Despite its low-level capabilities, the language was designed to encourage cross-platform programming. A standards-compliant and portably written C program can be compiled for a very wide variety of computer platforms and operating systems with few changes to its source code. The language has become available on a very wide range of platforms, from embedded micro-controllers to supercomputers.
c Tag usage
Questions that are not related to microcontroller programming or embedded firmware should be asked at Stack Overflow.
When posting questions about C programming, please make sure to include:
- Target system & compiler version, including the specific CPU/microcontroller part that is used.
- Unless the question explicitly mentions which version of the C standard that is used, it is assumed that the current version is used. That is, whichever version of ISO 9899 that ISO currently lists as active. Please have this in mind when answering or commenting on questions tagged c.
- Relevant flags/switches passed to the compiler, assembler or linker if applicable.
- Verbatim copies of compiler warnings or errors if applicable. Please post them as text and not as screen shots.
- Snippets of source code identified as problematic by the compiler if applicable. Note that many compilers stay silent by default as long as they are able to compile your code, so you have to explicitly enable compiler warnings. With the widely used GCC for example, you should always pass
-Wall -Wextra -pedantic
on the command line.
Is it C, C++ or both?
This tag is for questions related to C, not C++. In some cases, you may be working with both and applying both tags is entirely appropriate. However, please refrain from using both tags in an effort to help your question reach a wider audience. After all, C++ answers won't help you solve the problem in C, and good C answers often do not describe the best approach in C++.
Important notes that may save you time
- Stack Overflow has a user-maintained C FAQ at the tag wiki page.
- The comp.lang.c FAQ has answers to many frequently asked C questions. For example, see The Clockwise/Spiral Rule for parsing C declarations.