Introduction to C Programming — PBA Institute Tutorial
Chapter 01 · C Programming Series
10 min read Beginner

Introduction To C Programming

C is a powerful and versatile programming language developed by Dennis Ritchie at Bell Labs in the early 1970s. It is a procedural, general-purpose language renowned for its efficiency, flexibility, and low-level memory access — forming the backbone of modern operating systems and embedded systems worldwide.

Key Features of C

⚙️

Procedural

Programs are organized into functions, following a clear top-down procedural style.

🌐

Portability

Write once, compile anywhere — C programs run across multiple platforms with minimal changes.

Efficiency

Direct hardware access and fast execution make C perfect for systems programming.

📦

Modularity

Functions and libraries promote clean, reusable, well-organized code.

🛡️

Static Typing

Data types are resolved at compile time, catching errors before runtime.

🔒

Low-Level Access

C provides direct memory manipulation using pointers, making it ideal for operating systems and embedded development.

Syntax

  • C syntax is clean and minimal — designed for clarity and speed.
  • Programs use keywords, identifiers, operators, and special symbols.
  • Every statement ends with a semicolon ( ; ) to mark its completion.
  • Code blocks are grouped inside curly braces { }.

Data Types

Type Description Size Example
intStores whole integers4 bytesint x = 5;
charStores a single character1 bytechar c = 'A';
floatSingle-precision decimal4 bytesfloat f = 3.14;
doubleDouble-precision decimal8 bytesdouble d = 9.99;

Variables & Constants

  • Variables are named memory slots used to store data during a program's execution.
  • All variables must be declared with a type before they can be used.
  • Constants are fixed values that do not change during program execution.
  • Use the const keyword to declare a read-only constant variable.

Operators

Arithmetic
+-*/%
Relational
==!=<><=>=
Logical
&&||!
Assignment
=+=-=*=

Control Flow

Decisions

if and else run code based on true or false conditions.

Switch

switch handles multiple conditions in a clean, readable way.

Loops

for, while, and do-while repeat blocks of code.

Standard Library

<stdio.h>

Standard I/O — provides printf() for output and scanf() for input.

<stdlib.h>

Standard Library — utility functions like malloc(), free(), and exit().

<math.h>

Math functions — sqrt(), pow(), fabs() and more.

Your First C Program

C Code — Hello World
#include<stdio.h>

main()
{
    printf("Hello, PBA INSTITUTE");
}
Output Hello, PBA INSTITUTE

Examples

Sum of 4 Numbers
#include<stdio.h>

main()
{
    int a=2, b=3, c=5, l=6, e=1;
    e = a + b + c + l;
    printf("sum=%d", e);
}
Output sum = 16
Area of Square
#include<stdio.h>

main()
{
    int a=6, b;
    b = a * a;
    printf("Area of square=%d", b);
}
Output Area of square = 36

Conclusion

C remains one of the most important programming languages in computer science. It gives you a deep understanding of how programs work at the hardware level, memory management, and algorithmic thinking. Consistent practice with real programs is the fastest path to mastering C — keep writing code every day!