C is a powerful general-purpose programming language. It is fast, portable, and widely used in system/software development, embedded programming, and more. It forms the foundation for many other languages, including C++, Java, and Python.
π Did you know? The C programming language was developed by Dennis Ritchie in 1972 at Bell Labs. It was originally designed for UNIX systems.
Hereβs what a basic C program looks like:
#include <stdio.h> int main() { printf("Hello, World!"); return 0; }
#include <stdio.h>
β Tells the compiler to include the standard I/O library.int main()
β Entry point of the program.printf()
β Function to print output.return 0;
β Ends the program.To run your first C program:
hello.c
.gcc hello.c -o hello
./hello
β οΈ C is case-sensitive! Main
is different from main
. Always write functions and syntax correctly.
Practice by modifying the printf()
statement to print your name, or display multiple lines using \n
(new line).
printf("Hello!\nMy name is Technorank.");
main()
function, and statements.β
Challenge: Try printing your own name and age using the printf()
function!
Help others discover Technorank Learning by sharing your honest experience.
Your support inspires us to keep building!