BPOPS103/203 - PRINCIPLES OF PROGRAMMING USING C
MODULE 1: INTRODUCTION TO C (6 Hours)
Topics:
-
Introduction to Computers
- Input devices
- Output devices
- Designing efficient programs
-
Introduction to C
- History of C
- Features of C
- Structure of C program
-
Files Used in C Program
- Header files
- Source files
-
Compilers
- Types of compilers
- Compiling process
- Executing C programs
-
Basic Elements
- Variables
- Constants
- Data types
-
Input/Output Statements
- printf()
- scanf()
- getchar()
- putchar()
Reference: Chapter 1.1-1.9, 2.1-2.2, 8.1-8.6, 9.1-9.14
MODULE 2: OPERATORS AND CONTROL STATEMENTS (6 Hours)
Topics:
-
Operators in C
- Arithmetic operators
- Relational operators
- Logical operators
- Assignment operators
- Increment/Decrement operators
- Conditional operator
- Bitwise operators
- Special operators
-
Type Conversion and Typecasting
- Implicit conversion
- Explicit conversion (casting)
-
Decision Control Statements
- if statement
- if-else statement
- Nested if-else
- else-if ladder
- switch-case statement
-
Looping Statements
- for loop
- while loop
- do-while loop
- Nested loops
-
Jump Statements
- break statement
- continue statement
- goto statement
Reference: Chapter 9.15-9.16, 10.1-10.6
MODULE 3: FUNCTIONS AND ARRAYS (8 Hours)
Part A: Functions
Topics:
-
Introduction to Functions
- Need for functions
- Advantages
-
Function Components
- Function definition
- Function declaration (prototype)
- Function call
- Return statement
-
Parameter Passing
- Call by value
- Call by reference
-
Scope of Variables
- Local variables
- Global variables
-
Storage Classes
- auto
- static
- extern
- register
-
Recursive Functions
- Concept
- Examples
Part B: Arrays
Topics:
-
One-Dimensional Arrays
- Declaration
- Accessing elements
- Storing values
- Operations on arrays
-
Passing Arrays to Functions
-
Two-Dimensional Arrays
- Declaration
- Operations
- Passing to functions
-
Multidimensional Arrays
-
Applications of Arrays
- Searching
- Sorting
Reference: Chapter 11.1-11.10, 12.1-12.10, 12.12
MODULE 4: STRINGS AND POINTERS (6 Hours)
Part A: Strings
Topics:
-
Introduction to Strings
- String taxonomy
- String declaration
-
Operations on Strings
- String input/output
- String length
- String copy
- String concatenation
- String comparison
-
Miscellaneous String Functions
- strcat()
- strcpy()
- strcmp()
- strlen()
- strrev()
- strupr()
- strlwr()
-
Character Functions
- toupper()
- tolower()
- isalpha()
- isdigit()
-
Arrays of Strings
- 2D character arrays
Part B: Pointers
Topics:
-
Introduction to Pointers
- Concept of pointers
- Memory addresses
-
Declaring Pointer Variables
- Syntax
- Initialization
-
Types of Pointers
- Null pointer
- Void pointer
- Wild pointer
- Dangling pointer
-
Pointer Operations
- Dereferencing
- Pointer arithmetic
-
Passing Arguments Using Pointers
- Call by reference using pointers
Reference: Chapter 13.1-13.6, 14.1-14.7
MODULE 5: STRUCTURES, UNIONS, AND FILES (6 Hours)
Part A: Structures and Unions
Topics:
-
Structures
- Introduction
- Declaration
- Accessing members
- Initialization
- Array of structures
- Nested structures
-
Structures and Functions
- Passing structures to functions
- Returning structures from functions
-
Unions
- Definition
- Declaration
- Difference between structure and union
-
Unions Inside Structures
-
Enumerated Data Type
- enum keyword
- Declaration
- Usage
Part B: Files
Topics:
-
Introduction to Files
- Need for files
- Types of files
-
Using Files in C
- File pointer
- Opening a file (fopen)
- Closing a file (fclose)
-
File Operations
- Reading from files
- fgetc()
- fgets()
- fscanf()
- Writing to files
- fputc()
- fputs()
- fprintf()
- Reading from files
-
Detecting End of File
- feof()
- EOF
Reference: Chapter 15.1-15.10, 16.1-16.5
PROGRAMMING ASSIGNMENTS (12 Programs)
- Simple Calculator Simulation
- Quadratic Equation Roots (with appropriate messages)
- Electricity Bill Calculation (with different tariff rates)
- Pattern Printing (Number pyramid)
- Binary Search on Integers
- Matrix Multiplication (with validation)
- Taylor Series - sin(x)/cos(x) approximation
- Bubble Sort
- String Operations (compare, concatenate, length)
- Student Marks Management (using structures)
- Array Statistics (sum, mean, standard deviation using pointers)
- File Copy Program (text file to another file)
KEY CONCEPTS TO MASTER:
Module 1:
- C program structure
- printf() and scanf() syntax
- Format specifiers (%d, %f, %c, %s)
Module 2:
- Operator precedence and associativity
- if-else vs switch-case
- for vs while vs do-while
Module 3:
- Function prototype vs definition
- Storage class differences
- Recursion vs iteration
- Array indexing (0-based)
- 2D array as array of arrays
Module 4:
- String null terminator '\0'
- String library functions
- Pointer declaration:
int *ptr; - Pointer arithmetic
- Pass by reference using pointers
Module 5:
- Structure member access:
.operator - Union memory sharing
- File modes: "r", "w", "a", "r+", "w+", "a+"
- fopen() returns NULL if fails
EXAM PATTERN:
CIE: 50 marks (30 theory + 20 practical)
SEE Theory: 50 marks (3 hours)
SEE Practical: 50 marks (2 hours)
Theory Exam:
- 10 questions (2 per module)
- Answer 5 questions (1 from each module)
- Each question: 20 marks
Practical Exam:
- Pick 1 program from lot
- Writeup: 20%
- Execution & Result: 60%
- Viva: 20%
IMPORTANT POINTS:
Must Know Programs:
- ✅ Calculator (Module 1-2)
- ✅ Pattern printing (Module 2)
- ✅ Sorting algorithms (Module 3)
- ✅ String operations (Module 4)
- ✅ File operations (Module 5)
Frequently Asked Theory:
- Structure of C program
- Difference: while vs do-while
- Storage classes
- Pointer concepts
- Structure vs Union
- File operations
TEXTBOOK:
Primary:
- Reema Thareja - Computer Fundamentals and Programming in C (2nd Ed., Oxford, 2017)
Reference:
- E. Balaguruswamy - Programming in ANSI C (7th Ed., TMH)
- Kernighan & Ritchie - The C Programming Language (PHI)
ALL TOPICS COVERED - READY FOR CODING! 💻