History and Features of C Language
Every C exam has one question for sure: "Write the history and features of C."
In this lesson you will learn where C came from, who made it, how it changed over the years, and the features that make it special. Everything is in short points, so it is easy to remember.
What You Will Learn
- The family tree of C: ALGOL → BCPL → B → C.
- Who made B and who made C.
- The C standards: ANSI C, C99, C11, C17 and C23.
- The main features of C, with simple meanings.
- How to check which C version your compiler uses.
History of C Language
Exam definition: C was developed by Dennis Ritchie at AT&T Bell Laboratories, USA, in 1972. It was developed from the B language to write the UNIX operating system.
The family tree of C
C did not come from nothing. It grew from older languages, one step at a time:
| Year | Language | Developed by |
|---|---|---|
| 1960 | ALGOL 60 | International committee |
| 1963 | CPL | Cambridge and London universities |
| 1967 | BCPL | Martin Richards |
| 1969 – 1970 | B | Ken Thompson (Bell Labs) |
| 1972 | C | Dennis Ritchie (Bell Labs) |
Memory trick: "All Cats Bring Babies Close" = ALGOL → CPL → BCPL → B → C.
Why was C made?
- At Bell Labs, Ken Thompson and Dennis Ritchie were building the UNIX operating system.
- B was too simple. It had no data types (like
intandchar). - So Dennis Ritchie improved B, added data types and other features, and named it C, the next letter after B.
- In 1973, most of UNIX was rewritten in C. This proved that an operating system could be written in a high-level language.
C standards (versions of C)
A standard is an official rule book. It makes sure C works the same way on every computer.
| Year | Version | What it means |
|---|---|---|
| 1978 | K&R C | The book The C Programming Language by Brian Kernighan and Dennis Ritchie. It was the first unofficial guide. |
| 1989 / 1990 | ANSI C (C89 / C90) | The first official standard. Made by ANSI (USA) in 1989 and accepted by ISO in 1990. |
| 1999 | C99 | Added // comments, long long, bool and variables declared anywhere. |
| 2011 | C11 | Added multithreading support and safer features. |
| 2018 | C17 (also called C18) | Mostly bug fixes to C11. |
| 2024 | C23 | The latest standard. Added true/false as keywords, nullptr and more. |
Features of C Language
These are the features examiners expect you to write. Learn the name and its one-line meaning:
| Feature | Simple meaning |
|---|---|
| Simple | It has a small set of keywords (32 in ANSI C) and clear rules. |
| Portable | A C program written on one computer can run on another with little or no change. |
| Fast | C is compiled to machine code, so programs run very quickly. |
| Middle-level | It has high-level features and can also work with memory like a low-level language. |
| Structured | A big program is divided into small parts called functions. |
| Rich library | It has many ready-made functions, like printf(), sqrt() and strlen(). |
| Pointers | It can work directly with memory addresses. |
| Dynamic memory | It can take memory while the program is running (malloc()) and give it back (free()). |
| Extensible | You can add your own functions to the library. |
| Case-sensitive | main and Main are different names. |
Memory trick: "SPF MSR" = Simple, Portable, Fast, Middle-level, Structured, Rich library. Write these six first in the exam, then add pointers and dynamic memory.
Example 1: Check Your C Version in a C Program
Every compiler follows one C standard. This program tells you which one your compiler uses.
#include <stdio.h>
int main(void)
{
#ifdef __STDC_VERSION__
printf("C standard version: %ld\n", __STDC_VERSION__);
#else
printf("C standard version: C89 / C90\n");
#endif
return 0;
}
Output
C standard version: 201710
Your number may be different. It depends on your compiler. Use this table to read it:
| Number printed | Standard |
|---|---|
| 199901 | C99 |
| 201112 | C11 |
| 201710 | C17 |
| 202311 | C23 |
Code Explanation
#ifdef __STDC_VERSION__: checks if the compiler has defined a special name called__STDC_VERSION__. Newer compilers (C95 and later) always define it.printf("... %ld\n", __STDC_VERSION__);: prints that value. It is alongnumber, so we use%ld.#else: if the name is not defined, the compiler is very old (C89 / C90).#endif: ends the#ifdefblock.
Lines starting with # are handled by the preprocessor before compilation. You will learn them in the Preprocessor module.
How It Works
- The compiler already knows which standard it follows.
- Before compiling, the preprocessor replaces
__STDC_VERSION__with a number such as201710L. - The program simply prints that number.
- You can choose a standard yourself:
gcc -std=c99 file.corgcc -std=c11 file.c.
Example 2: C Can Show a Memory Address (Low-Level Feature)
This small program shows why C is called middle-level. It prints a value, and also the place in memory where the value is stored.
#include <stdio.h>
int main(void)
{
int marks = 90;
printf("Value of marks: %d\n", marks);
printf("Address of marks: %p\n", (void *)&marks);
return 0;
}
Output
Value of marks: 90 Address of marks: 0x7ffc3a9e1b2c
The address will be different on your computer, and it can change every time you run the program. &marks means "address of marks". You will learn this in detail in the Pointers module.
Important Points to Remember
- B was made by Ken Thompson. C was made by Dennis Ritchie.
- C was made in 1972 at Bell Labs to write UNIX.
- The first official standard is ANSI C (C89 / C90).
- ANSI C has 32 keywords.
- The latest standard is C23 (published in 2024).
Common Mistakes Students Make
| Wrong answer | Correct answer |
|---|---|
| C was made by Bjarne Stroustrup | Dennis Ritchie made C. Bjarne Stroustrup made C++. |
| Dennis Ritchie made B | Ken Thompson made B. |
| C is object-oriented | C is procedural. It has no classes or objects. |
| C was made for Windows | C was made for UNIX. |
| C comes from C++ | It is the opposite: C++ comes from C. |
C Language History Practice Questions
- Who developed C, where, and in which year?
- Write the order of languages from ALGOL to C.
- Why was C created?
- What is ANSI C?
- Write any six features of C.
Show answers
- Dennis Ritchie, at AT&T Bell Labs (USA), in 1972.
- ALGOL → CPL → BCPL → B → C.
- To write the UNIX operating system. B had no data types, so Ritchie improved it into C.
- ANSI C is the first official standard of C, made by ANSI in 1989 (C89) and accepted by ISO in 1990 (C90).
- Simple, portable, fast, middle-level, structured, rich library (also: pointers, dynamic memory, extensible).
Coding Exercise
Write a C program that prints a short "C timeline" like this:
1969 - B language (Ken Thompson) 1972 - C language (Dennis Ritchie) 1989 - ANSI C (C89) 2024 - C23 (latest standard)
Show solution
#include <stdio.h>
int main(void)
{
printf("1969 - B language (Ken Thompson)\n");
printf("1972 - C language (Dennis Ritchie)\n");
printf("1989 - ANSI C (C89)\n");
printf("2024 - C23 (latest standard)\n");
return 0;
}
Quick Quiz: History and Features of C (MCQ)
-
Which language came just before C?
A) BCPL B) B C) ALGOL D) C++
-
Who developed the B language?
A) Dennis Ritchie B) Martin Richards C) Ken Thompson D) Brian Kernighan
-
C was first developed to write which operating system?
A) Windows B) UNIX C) DOS D) Linux
-
How many keywords does ANSI C have?
A) 24 B) 32 C) 48 D) 64
-
Which of these is NOT a feature of C?
A) Portable B) Fast C) Object-oriented D) Structured
Show answers
- B: B came just before C.
- C: Ken Thompson.
- B: UNIX.
- B: 32 keywords.
- C: C is procedural, not object-oriented.
Quick Revision for Exams and Interviews
Read this before your exam. The highlighted words are the answer.
Must-remember facts
| C developed by | Dennis Ritchie |
|---|---|
| Year and place | 1972, AT&T Bell Labs, USA |
| B developed by | Ken Thompson (1969 – 1970) |
| BCPL developed by | Martin Richards (1967) |
| Family order | ALGOL → CPL → BCPL → B → C |
| Made to write | UNIX operating system |
| K&R C | 1978 book by Kernighan and Ritchie |
| First standard | ANSI C (C89 / C90) |
| Latest standard | C23 (published 2024) |
| Keywords in ANSI C | 32 |
Frequently asked questions
- Why is it called "C"?
- Because it came after the B language, so it got the next letter.
- What was missing in B that C added?
- B had no data types. C added types like
int,charandfloat. - What is ANSI C?
- The first official standard of C, made by ANSI in 1989 (C89).
- Why is C called portable?
- The same program can run on different computers with little or no change.
- Why is C called a structured language?
- A big program is divided into small functions, which are easy to write and test.
- Is C object-oriented?
- No. C is procedural. C++ added object-oriented features.
Remember
- Family order: A-C-B-B-C (ALGOL, CPL, BCPL, B, C).
- Top 6 features: SPF MSR (Simple, Portable, Fast, Middle-level, Structured, Rich library).
- Ken Thompson → B, Dennis Ritchie → C, Bjarne Stroustrup → C++.
Next Topic
Next lesson: Applications of C Language. You will see where C is used in the real world, from operating systems to the chips inside your washing machine.