Description #
C is a general-purpose, compiled programming language that provides low-level access to memory and is known for its speed, portability, and efficiency. Itโs widely used for system programming, embedded systems, operating systems, and performance-critical applications.
History #
C was developed in the early 1970s by Dennis Ritchie at Bell Labs, primarily to rewrite the Unix operating system in a higher-level language. It evolved from the B language, which was based on BCPL.
The language was standardized in 1989 as ANSI C (C89), and later as ISO C (C90). Subsequent standards include C99, C11, and C17, which added new features like inline functions, improved type checking, and concurrency support.
C has profoundly influenced many modern languages, including C++, Java, and Go, and remains foundational in computer science education.
Hello World Code #
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
How to Run #
Save the code in a file named hello.c
Compile the program using a C compiler like GCC:
Run the compiled program:
./hello
๐ On Windows, you may run hello.exe
instead of ./hello
.
Key Concepts #
#include <stdio.h>
โ imports standard I/O functions
main()
โ the programโs entry point
printf()
โ prints output to the console
Semicolons end each statement
Curly braces define code blocks
Compiled language โ needs to be compiled before running
Strongly typed โ variables require declared data types
Pointers โ direct memory manipulation
Header files โ code modularization
Manual memory management using malloc()
and free()
Try It Online #
๐ OnlineGDB โ C Compiler
๐ Replit โ C
๐ Programiz C Compiler
Fun Facts #
- C was used to build the first Unix kernel
- The Linux kernel is mostly written in C
- C influenced over 50 languages, including C++, Objective-C, Java, and even Python
- Itโs one of the fastest and most portable languages in existence
- The โHello, World!โ tradition originated in a C programming book by Brian Kernighan