What is "c"
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie in the Bell Telephone Laboratories for use with the UNIX operating system. Its design provides constructs that efficiently map to typical machine instructions and thus found lasting use in applications that were previously encoded in assembly language.
Although C has been designed for system software implementation, it is also widely used for development of 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 there is no C compiler. C has influenced many other popular programming languages, mainly c++, which started as an extension to C.
Design
C has imperative paradigm (procedural). It is designed to be compiled using a relatively simple compiler, to provide low-level access to memory, to provide language constructs that map efficiently for machine instructions, and to require minimal runtime support (Runtime). C was therefore useful for many applications that had previously been encoded in Assembly language.
Despite its low-level capabilities, the language was created to encourage cross-platform programming. A standard-compliant C program written to be portable can be compiled for a wide variety of computer platforms and operating systems, with few changes to its source code. The language has become available on a wide range of platforms, from microcontrollers embedded to supercomputers.
When posting questions about C programming, please make sure to include:
- Operating system and compiler version
- Relevant flags/switches passed to the compiler, Assembler or Linker, if applicable
- Faithful copies of warnings compiler or errors if applicable
- Troublesome source code snippets identified by the compiler, if applicable
In almost all cases, questions about C cannot be answered if the community cannot see the code that is not working. Good questions should:
- Describe the desired result
- Show any related source code
- Describe the current result, and why it is not desirable
- Describe any steps you took to fix the issue, including debugger output, if applicable
An ideal source code snippet contains the minimum necessary to demonstrate the problem you are facing, but it is still compileable as is. Someone reading the question should be able to copy and paste what you posted, and (approximately) reproduce the problem you found.
It’s C, C++ or both?
This tag is for C-related issues, no c++. In some cases, you may be working with both and applying both tags is entirely appropriate. However, please do not use both tags in an effort to help your question reach a wider audience. After all, C’s answers++ nay help solve the problem in C, and good answers C often do not describe the best approach in C++.
Help us help you
Please help keep your question readable using proper formatting, correct spelling and good grammar. When you post a question, please monitor your activity because more information or clarifications may be required in order to provide a good answer.
Help with school work
Questions related to homework are welcome, provided that:
- Briefly explain the problem you are trying to solve, please do not post the statement of the problem in full.
- Explain what you tried and where you are standing (preferably with code examples)
- Do not ask for complete solutions to the problem, we are not here to do your homework for you.
Compilers online
There are several services that offer access to C compilers by the browser. Its use is suggested in questions and answers to demonstrate a specific behavior. Some of these (in English):
Important notes that can save time
- comp.lang. c FAQ has answers to many frequently asked questions C. For example, see The Clockwise/Spiral Rule to analyze C statements.
Book guide
- The C Programming Language (Second Edition) - Brian W. Kernighan and Dennis M. Ritchie
- C: A Reference Manual - Samuel P. Harbison and Guy R. Steele
- C Pocket Reference (O'Reilly) - Peter Prinz , Ulla Kirch- Prinz
- C - Traps & Pitfalls - Andrew R. Koenig (Bell Labs)
- Training in Language C (pt) - Mizrahi, Victorine Viviane (PEARSON)