Lecture 1 / 57
Topic 01 - Unit I Introduction , why you learn c

Data Representation

Syllabus Topic Template
Lecture Template

Data representation is the method used by computers to store, process, and understand information internally. Since computers only understand binary values (0 and 1), all data including numbers, characters, images, audio, and videos are converted into binary form.

Understanding data representation is important because it helps programmers understand how memory works, how data is stored, and how programs operate internally.

Overview

Computers cannot understand human language directly. They only understand electrical signals represented by:

  • 0 → OFF
  • 1 → ON

These binary digits are called bits. Multiple bits together form meaningful data.

Basic Data Units
Unit Description
Bit Smallest unit of data (0 or 1)
Nibble 4 bits
Byte 8 bits
Kilobyte (KB) 1024 bytes
Megabyte (MB) 1024 KB
Gigabyte (GB) 1024 MB

Why Learn C Language?

C is one of the most powerful and foundational programming languages. It is often called the “mother of modern programming languages” because many languages such as C++, Java, and Python are influenced by C.

💡 Advantages of Learning C
  • Helps understand computer memory and low-level programming
  • Builds strong programming fundamentals
  • Used in operating systems and embedded systems
  • Improves logical thinking and problem solving
  • Fast and efficient execution speed

Binary Number System

The binary number system uses only two digits: 0 and 1.

Every value inside a computer is represented using binary numbers.

Decimal to Binary Example
Decimal Binary
1 0001
2 0010
5 0101
10 1010

Character Representation

Characters are stored using encoding systems such as ASCII and Unicode.

ASCII Examples
Character ASCII Value
A 65
B 66
a 97
0 48

Memory Representation

Data inside a computer is stored in memory locations. Each location has a unique address.

In C programming, understanding memory is extremely important because variables directly interact with memory locations.

Example

If an integer variable stores the value 10, the value is actually stored in binary form inside memory.

Example

main.c
// Example of character and integer representation in C

#include <stdio.h>

int main() {

    int number = 65;
    char character = 'A';

    printf("Integer value: %d\n", number);
    printf("Character value: %c\n", character);

    return 0;
}
Output
Integer value: 65
Character value: A
        

Understanding the Example

  • int stores integer values
  • char stores character values
  • The character 'A' internally uses ASCII value 65
  • The computer stores both values in binary form

Applications of Data Representation

  • Memory management
  • File storage systems
  • Image and video processing
  • Networking and communication
  • Operating systems
  • Embedded systems programming
Practice Task

Write a C program that:

  • Stores an integer value
  • Stores a character value
  • Prints both values using printf()

Bonus Challenge:

  • Find the ASCII value of the character 'Z'
  • Convert decimal number 15 into binary
  • Research how Unicode differs from ASCII
Topic 02 - Unit I - Logic Development

Flowcharts

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Flowcharts here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Flowcharts

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 03 - Unit I - Logic Development

Problem Analysis

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Problem Analysis here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Problem Analysis

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 04 - Unit I - Logic Development

Decision Trees/Tables

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Decision Trees/Tables here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Decision Trees/Tables

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 05 - Unit I - Logic Development

Pseudo Code and Algorithms

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Pseudo Code and Algorithms here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Pseudo Code and Algorithms

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 06 - Unit I - Fundamentals [CO1]

Character Set

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Character Set here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Character Set

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 07 - Unit I - Fundamentals [CO1]

Identifiers and Key Words

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Identifiers and Key Words here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Identifiers and Key Words

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 08 - Unit I - Fundamentals [CO1]

Data Types

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Data Types here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Data Types

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 09 - Unit I - Fundamentals [CO1]

Constants

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Constants here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Constants

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 10 - Unit I - Fundamentals [CO1]

Variables

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Variables here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Variables

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 11 - Unit I - Fundamentals [CO1]

Expressions

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Expressions here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Expressions

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 12 - Unit I - Fundamentals [CO1]

Statements

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Statements here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Statements

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 13 - Unit I - Fundamentals [CO1]

Symbolic Constants [CO1]

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Symbolic Constants [CO1] here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Symbolic Constants [CO1]

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 14 - Unit I - Operations and Expressions [CO2]

Arithmetic Operators

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Arithmetic Operators here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Arithmetic Operators

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 15 - Unit I - Operations and Expressions [CO2]

Unary Operators

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Unary Operators here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Unary Operators

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 16 - Unit I - Operations and Expressions [CO2]

Relational Operators

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Relational Operators here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Relational Operators

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 17 - Unit I - Operations and Expressions [CO2]

Logical Operators

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Logical Operators here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Logical Operators

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 18 - Unit I - Operations and Expressions [CO2]

Assignment and Conditional Operators

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Assignment and Conditional Operators here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Assignment and Conditional Operators

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 19 - Unit I - Operations and Expressions [CO2]

Library Functions [CO2]

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Library Functions [CO2] here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Library Functions [CO2]

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 20 - Unit II - Data Input and Output

Formatted Input/Output

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Formatted Input/Output here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Formatted Input/Output

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 21 - Unit II - Data Input and Output

Unformatted Input/Output

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Unformatted Input/Output here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Unformatted Input/Output

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 22 - Unit II - Control Statements [CO3]

While Statement

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for While Statement here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for While Statement

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 23 - Unit II - Control Statements [CO3]

Do-While Statement

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Do-While Statement here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Do-While Statement

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 24 - Unit II - Control Statements [CO3]

For Statement

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for For Statement here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for For Statement

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 25 - Unit II - Control Statements [CO3]

Nested Loops

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Nested Loops here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Nested Loops

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 26 - Unit II - Control Statements [CO3]

If-Else Statement

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for If-Else Statement here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for If-Else Statement

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 27 - Unit II - Control Statements [CO3]

Switch Statement

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Switch Statement here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Switch Statement

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 28 - Unit II - Control Statements [CO3]

Break and Continue Statements [CO3]

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Break and Continue Statements [CO3] here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Break and Continue Statements [CO3]

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 29 - Unit III - Functions [CO4]

Functions Overview

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Functions Overview here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Functions Overview

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 30 - Unit III - Functions [CO4]

Defining Functions

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Defining Functions here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Defining Functions

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 31 - Unit III - Functions [CO4]

Accessing Functions

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Accessing Functions here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Accessing Functions

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 32 - Unit III - Functions [CO4]

Passing Arguments to Functions

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Passing Arguments to Functions here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Passing Arguments to Functions

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 33 - Unit III - Functions [CO4]

Specifying Argument Data Types

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Specifying Argument Data Types here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Specifying Argument Data Types

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 34 - Unit III - Functions [CO4]

Function Prototypes

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Function Prototypes here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Function Prototypes

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 35 - Unit III - Functions [CO4]

Recursion [CO4]

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Recursion [CO4] here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Recursion [CO4]

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 36 - Unit III - Arrays

Defining Arrays

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Defining Arrays here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Defining Arrays

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 37 - Unit III - Arrays

Processing Arrays

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Processing Arrays here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Processing Arrays

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 38 - Unit III - Arrays

Passing Arrays to a Function

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Passing Arrays to a Function here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Passing Arrays to a Function

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 39 - Unit III - Arrays

Multi-Dimensional Arrays

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Multi-Dimensional Arrays here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Multi-Dimensional Arrays

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 40 - Unit III - Strings

String Declaration

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for String Declaration here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for String Declaration

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 41 - Unit III - Strings

String Functions

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for String Functions here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for String Functions

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 42 - Unit III - Strings

String Manipulation

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for String Manipulation here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for String Manipulation

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 43 - Unit III - Program Structure Storage Class [CO3]

Automatic Variables

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Automatic Variables here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Automatic Variables

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 44 - Unit III - Program Structure Storage Class [CO3]

External Variables

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for External Variables here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for External Variables

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 45 - Unit III - Program Structure Storage Class [CO3]

Static Variables [CO3]

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Static Variables [CO3] here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Static Variables [CO3]

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 46 - Unit IV - Structures and Unions

Defining and Processing a Structure

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Defining and Processing a Structure here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Defining and Processing a Structure

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 47 - Unit IV - Structures and Unions

User Defined Data Types

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for User Defined Data Types here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for User Defined Data Types

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 48 - Unit IV - Structures and Unions

Structures and Pointers

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Structures and Pointers here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Structures and Pointers

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 49 - Unit IV - Structures and Unions

Passing Structures to Functions

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Passing Structures to Functions here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Passing Structures to Functions

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 50 - Unit IV - Structures and Unions

Unions

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Unions here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Unions

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 51 - Unit IV - Pointers

Understanding Pointers

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Understanding Pointers here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Understanding Pointers

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 52 - Unit IV - Pointers

Accessing the Address of a Variable

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Accessing the Address of a Variable here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Accessing the Address of a Variable

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 53 - Unit IV - Pointers

Declaration and Initialization of Pointer Variables

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Declaration and Initialization of Pointer Variables here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Declaration and Initialization of Pointer Variables

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 54 - Unit IV - Pointers

Accessing a Variable through its Pointer

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Accessing a Variable through its Pointer here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Accessing a Variable through its Pointer

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 55 - Unit IV - Pointers

Pointers and Arrays

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Pointers and Arrays here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Pointers and Arrays

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 56 - Unit IV - File Handling [CO5]

File Operations

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for File Operations here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for File Operations

Practice

Practice Task

Add a hands-on practice question for this topic.

Topic 57 - Unit IV - File Handling [CO5]

Processing a Data File [CO5]

Syllabus Topic Template
Lecture Template

Add your explanation, examples, output, and exercises for Processing a Data File [CO5] here.

Overview

Write the overview for this topic.

Example

main.c
// Add example C code for Processing a Data File [CO5]

Practice

Practice Task

Add a hands-on practice question for this topic.