C is a powerful general purpose and high-level programming language which can be used in a variety of applications, from engineering and science to everyday business programs. Watch C engineers from from San Francisco, London, New York, Moscow, Beijing and Sao Paolo write production-level code and compare coding processes and workflows. Start with our C tutorials, watch videos and live streams from our members and start sharing your ideas and projects! read more ...

Introduction to C Programming Language

C (pronounced the same way as the letter C) is a general-purpose systems programming language. Like most system languages, it uses an imperative paradigm. It supports structured programming, lexical scoping, recursion, and a static type system. C is designed to expose constructs that map efficiently to hardware operations. It is widely used in applications that were formerly developed in assembly language, including operating systems. It is used everywhere from supercomputers to embedded systems.

Dennis Ritchie created C at Bell Labs between 1969 and 1973 to support the creation of a portable version of Unix. It is now one of the most widely used programming languages ever created, with C compilers from various available from various providers for nearly every computer architecture and operating system. The American National Standards Institute (ANSI) standardized C in 1989. Today, the standard is managed by the International Organization for Standardization (ISO).

C was originally intended for creating operating systems and the utilities that go with them. Examples include compilers, assemblers, text editors, print spoolers, network drivers, databases, and language interpreters.

History of C

The origin of C is closely tied to the development of the Unix operating system, originally implemented in assembly language on a PDP-7 by Ritchie and Thompson, incorporating several ideas from colleagues. Eventually, they decided to port the operating system to a PDP-11. The original PDP-11 version of Unix was developed in assembly language. The developers were considering rewriting the system using the B language, Thompson's simplified version of BCPL. However B's inability to take advantage of some of the PDP-11's features, notably byte addressability, led to C.

C development started in 1972 on the PDP-11 and was first distributed with Version 2 Unix. Though portability was not one of the original design goals, the language soon was running on other platforms as well. Within a year there was a compiler for the Honeywell 6000, and soon an IBM/370 port followed.

1972 also saw parts of Unix rewritten in C. By 1973, powerful features like the struct types allowed most of the Unix kernel to be C code.

Before Unix, most operating system kernels were built entirely in assembly. (Notable exceptions include the Multics system, written in PL/I, and MCP (Master Control Program) for the Burroughs B5000, written in Algol.)

In 1977, Ritchie collaborated with Stephen C. Johnson to make Unix more portable, and Johnson’s resulting Portable C Compiler laid the groundwork for bringing C to a variety of new platforms.

C Tools

VIM Vim is a powerful, efficient, highly configurable text editor. It is fully backward compatible with the default Unix editor Vi, but ads tons of new features. Whether you are looking for something new or a drop-in replacement for Vi, Vim has something to offer.

CTAGS Ctags indexes all the language objects in a body of C source code, and provides fast searching from a text editor or stand-alone utility. A tag signifies that a language object has an entry in the index.

CSCOPE Cscope is a more powerful alternative to Ctags for large C code bases. It generates an information database that can be searched rapidly and used as a reference.

CMAKE CMake is actually a family of tools for building, testing, and packaging software. CMake is Open Source and cross-platform. It controls the compiler with generic configuration files, and can generate platform-native makefiles and workspaces.

GPROF Gprof is a Unix performance analysis tool. It supports programs written in C, C++, Pascal, and Fortran 77. Profiling with a tool like Gprof shows where you program’s time is spent, and what you program’s function call structure is like. Gprof prints both a flat profile and a call graph to your console.

C Books

C is better learned from practice, but one of the most important part of learning is reading books. Books can make you understand the concepts better. Below are major C programming language categorized into three main categories -- beginner, intermediate, and advanced. Pick the book that fits into radar, and start learning C now!

Write powerful C programs…without becoming a technical expert! This book is the fastest way to get comfortable with C, one incredibly clear and easy step at a time. You’ll learn all the basics: how to organize programs, store and display data, work with variables, operators, I/O, pointers, arrays, functions, and much more. C programming has never been this simple!

Programming in C will teach you how to write programs in the C programming language. Whether you’re a novice or experienced programmer, this book will provide you with a clear understanding of this language, which is the foundation for many object-oriented programming languages such as C++, Objective-C, C#, and Java. This book teaches C by example, with complete C programs used to illustrate each new concept along the way. Stephen Kochan provides step-by-step explanations for all C functions. You will learn both the language fundamentals and good programming practices. Exercises at the end of each chapter make the book ideally suited for classroom use or for self-instruction. All the features of the C language are covered in this book, including the latest additions added with the C11 standard. Appendixes provide a detailed summary of the language and the standard C library, both organized for quick reference.

C Programming in easy steps, 4th edition has an easy-to-follow style that will appeal to anyone who wants to begin programming in C, from programmers moving from another programming language, to the student who is studying C programming at school or college, or to those seeking a career in computing who need a fundamental understanding of procedural programming.

Intermediate C Programming provides a stepping-stone for intermediate-level students to go from writing short programs to writing real programs well. It shows students how to identify and eliminate bugs, write clean code, share code with others, and use standard Linux-based tools, such as ddd and valgrind.

The new classic! C Primer Plus, now in its 5th edition, has been revised to include over 20 new programming exercises, newly improved examples and the new ANSI/ISO standard, C99. Task-oriented examples will teach you the fundamentals of C programming. From extended integer types and compound literals to Boolean support and variable-length arrays, you will learn to create practical and real-world applications with C programming. Review questions and programming exercises at the end of each chapter will reinforce what you have learned. This friendly and easy-to-use self-study guide will help you understand the fundamentals of this core programming language.

The first edition of C Programming: A Modern Approach was popular with students and faculty alike because of its clarity and comprehensiveness as well as its trademark Q&A sections. Professor King's spiral approach made it accessible to a broad range of readers, from beginners to more advanced students. With adoptions at over 225 colleges, the first edition was one of the leading C textbooks of the last ten years. The second edition maintains all the book's popular features and brings it up to date with coverage of the C99 standard. The new edition also adds a significant number of exercises and longer programming projects, and includes extensive revisions and updates.

This book is for the knowledgeable C programmer, this is a second book that gives the C programmers advanced tips and tricks. This book will help the C programmer reach new heights as a professional. Organized to make it easy for the reader to scan to sections that are relevant to their immediate needs.

This practical, example-driven, code-centered book is intended for intermediate-level C programmers who want to take their skills to the next level. The book builds on readers' existing background in C to complete their knowledge of ANSI C libraries, and the conceptual and syntactic structures needed to master dynamic data structures, string parsing and numeric conversion, memory management, bit-level manipulation, interactions with operating systems, and other advanced techniques. What sets this book apart from traditional data structures books is it's "blue collar" approach to the art of programming — how to master the "down in the trenches" C details to implement abstract ideas successfully. In recognition of this approach, the book presents actual C code rather than pseudocode.

Even C experts come across problems that require days of debugging to fix. This book helps to prevent such problems by showing how C programmers get themselves into trouble. Each of the book's many examples has trapped a professional programmer.

C Projects

C is one of the best and oldest programming languages still in use. Naturally, there are many projects that use it, and you’ve probably used many of them without even knowing it.

Linux is a general-purpose operating system that powers everything from coin-sized embedded systems to the world’s largest supercomputers, and is the poster child of the Open Source movement. Major websites like Google and Amazon run on Linux.

PostgreSQL is a database system. It is Free and Open Source, and emphasizes data robustness and integrity. Prominent users include OpenStreetMap, BASF, Reddit, MusicBrainz, the International Space Station, Instagram, Disqus, and TripAdvisor.

QNX Neutrino RTOS a embedded systems real-time operating system. High-priority tasks are guaranteed not to be interrupted by the operating system, allowing it to be used in systems where reaction time is paramount.

Quake III Arena is one of the most famous and influential first-person shoot-em-up computer games. It is focused on multiplayer games, leading it to be widely used for e-sports tournaments, and is highly customizable.

Brian Wilson Kernighan is a Canadian computer scientist. He worked at Bell Labs and participated in the creation of Unix. He is one of the creators of the AWK and AMPL programming languages. He is the "K" of K&R C and the "K" in AWK. He became a Computer Science professor at Princeton University in 2000.

Ken Thompson is an American computer science pioneer. He spent most of his career at Bell Labs, where he created Unix. He invented the B programming language, the direct ancestor to C. He also was one of the creators of the Plan 9 operating system. In 2006, Thompson joined Google, where he helped create the Go programming language.

William Nelson "Bill" Joy co-founded Sun Microsystems win Vinod Khosla, Scott McNealy, and Andreas von Bechtolsheim in 1982. While he was a graduate student at Berkeley, he was integral in the early development of BSD Unix. He also created Vi.

Programming Language Design and Implementation (PLDI) is one of the most important conferences put on my ACM SIGPLAN. PLDI’s precursor, the Symposium on Compiler Optimization, was held in July 1970 at the University of Illionois at Urbana-Champaign. Robert S. Northcote chaired that event, which included papers by Frances E. Allen, John Cocke, Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. The first PLDI conference was held at Denver, Colorado in 1979 under the name SIGPLAN Symposium on Compiler Construction.