65 of 146
Added a tag usage guideline to clarify which version of the standard answers/comments should refer to in cases where this isn't made clear by the question.
Lundin
  • 189.3k
  • 39
  • 248
  • 387

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 a highly efficient procedural oriented programming language, has emphasis on functions whereas modern object oriented programming languages tend to emphasize 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 , 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.

##Before you start

Please browse our list of frequently asked questions and the following list to see if your question is similar to one of the following:

If you haven't found an answer to your question after searching, or in the list above, we're here to help!

When posting questions about C programming, please make sure to include:

  • Target system & compiler version
  • Add , , or in case your question is specific to one particular version of the standard (more info).
  • Unless the question does not explicitly mention 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/commenting questions tagged .
  • Relevant flags / switches passed to the compiler, assembler or linker if applicable
  • Verbatim copies of compiler warnings or errors if applicable
  • Snippets of source code identified as problematic by the compiler if applicable

###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

Hello World program in C

#include <stdio.h>

int main (void) {
  printf("hello, world\n");
  return 0; /* This line is implicit since C99, but only for main */
}

Definitive Book Guide

The Definitive C Book Guide and List has been compiled by users as a definitive list of quality references for all levels of C programmer. If you're looking to learn or improve your C, you may find it helpful.

Chat Room

Chat about C with other Stack Overflow users