Introduction
C Programming Language
Features of C Programming Language
Low level language support:- C provides low level features and it is closely related to lower level language such as "Assembly Language".
Portability:- C is highly portable that means it can be run on any compiler with little or no change.
Powerful:- C provides wide verity of "Data Types" and "Functions". C provides usefulcontrol and loop control statements too.
High level features:- C is very user friendly as compare to other previous language such as BCPL, Pascal... etc. C collected all useful features of previous language thus C become more effective language.
Bit manipulation:- C can be manipulated using bits, so we can perform different operations at bit level. C supports bitwise operators to manage data at bit level.
Modular programming:- Modular programming is a software design technique that increases the extent to which software is composed of separate parts called modules. C program consist of different modules that can integrated together to form a complete program.
Efficient use of pointer:- C supports efficient use of pointer, and pointer has direct access to memory.
More efficient:- Program written in c language are very efficient and fast. Tish is due to its variety of data type and powerful operators.
Uses of C Programming Language
The C programming language is used for developing system applications on different platform such as Windows, UNIX, LINUX...etc. There are some examples of C being used as follows:-
Your First C Program
Every C program starts with a main() function. Here is the classic Hello World example with explanations:
/* This is a multi-line comment */
// This is a single-line comment (C99+)
#include <stdio.h> // Standard Input/Output library
int main() { // Entry point of every C program
printf("Hello, World!\n"); // Print to console
return 0; // 0 = success
}
/* Compile and run:
gcc hello.c -o hello
./hello
*/
C Program Structure
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Global variable
int globalCount = 0;
// Function prototype (declaration)
void greet(char *name);
int main() {
// Local variables
int age = 25;
float height = 5.9f;
char name[] = "Alice";
// Input
printf("Enter your age: ");
scanf("%d", &age);
// Output with format specifiers
printf("Name: %s\n", name);
printf("Age: %d\n", age);
printf("Height: %.1f\n", height);
greet(name);
return 0;
}
// Function definition
void greet(char *name) {
printf("Hello, %s! Welcome to C programming.\n", name);
}
- C is a compiled language - you must compile source code with gcc before running it.
- Every C program must have a main() function - it is the entry point of execution.
- #include directives import standard library headers like stdio.h for printf/scanf.
- C is case-sensitive - main, Main, and MAIN are three different identifiers.
- C uses manual memory management - you allocate with malloc() and free with free().
- C is the foundation of many languages including C++, Java, and Python - learning C builds strong programming fundamentals.
Ready to Level Up Your Skills?
Explore 500+ free tutorials across 20+ languages and frameworks.