Computer Programming

Computer Programming

First Year • Semester 1 • NEP Syllabus

Home › First Year › CP
🎓 Previous Papers
⚠️ **DISCLAIMER:** These papers are provided for educational review only. We do not own the copyright of the original university question papers.
Summer 2025 Paper NEW
⬇️ Download
Winter 2024 Paper
⬇️ Download
✅ Solutions
Winter 2024 Solved Paper

Summer 2025 Solutions coming soon...

📘 Syllabus
⚠️ **DISCLAIMER:** This syllabus copy is provided for reference only. Please verify with the official university website for the most current curriculum.

Computer Programming (1AS003ES)

**Course Aim:** To comprehend fundamental concepts of C Programming, develop problem-solving skills, manipulate data using arrays/strings, and manage complex data structures.

Unit I: C Fundamentals (7 Hrs)
Introduction, Importance of C, Basic Structure of C Program, Executing a C Program, Character Set, C Tokens, Keywords, Identifiers, Constants and Variables, Data Types, Operators, Basic Input and Output Operations, Expressions and Precedence of Operators, In-built Functions.
Unit II: Decision Making, Branching, and Looping (7 Hrs)
Introduction, Decision Making with If Statement, Simple If Statement, Nesting of If...Else Statements, Else If Ladder, ?: Operator, Goto Statement, While Statement, Do Statement, For Statement, Jumps in Loops, Concise Test Expressions.
Unit III: Arrays (7 Hrs)
Introduction to Arrays, One-Dimensional Arrays, Two-Dimensional Arrays, Multi-Dimensional Arrays, Example Programs Using Arrays.
Unit IV: Strings (8 Hrs)
Declaring and Initializing String Variables, Reading Strings from Terminal, Writing Strings to Screen, Arithmetic Operations on Characters, String-handling Functions, Example Programs (with and without using built-in string functions).
Unit V: Functions & Pointers (8 Hrs)
Introduction to Functions, Need for User-Defined Functions, Multi-Function Program, Elements of User-Defined Functions, Definition of Functions, Return Values and their Types, Function Calls, Function Declaration, Category of Functions, Recursion. Introduction to Pointers, Declaring Pointer Variables, Initialization of Pointer Variables, Accessing a Variable through its Pointer, Pointer Expressions, Pointer Increments, and Scale Factor.
Unit VI: Structures, Unions, and File Management (8 Hrs)
Defining a Structure, Declaring Structure Variables, Accessing Structure Members, Structure Initialization, Arrays of Structures, Unions and Structures. Introduction to Files, Defining and Opening a File, Closing a File, Input/Output and Error Handling on Files.
Text Book
E. Balaguruswamy, "Programming in ANSI C", McGraw-Hill.
Download Official Syllabus PDF
📝 Unit-wise Notes
Unit 1: C Fundamentals

C Fundamentals

Tokens: Smallest individual units in a program (Keywords, Identifiers, Constants).
Data Types: Primary (int, float, char), Derived (array, pointers), User-defined (structure, enum).
Operators: Symbols that tell the compiler to perform specific mathematical or logical manipulations (Arithmetic, Relational, Logical).

Unit 2: Control Structures

Decision Making & Looping

Branching: 'If', 'If-Else', 'Switch' statements allow execution of different code blocks based on conditions.
Looping: 'For', 'While', 'Do-While' loops execute a block of code repeatedly until a condition is met.

Unit 3: Arrays

Arrays

Definition: A collection of elements of the same data type stored in contiguous memory locations.
Types: One-dimensional (list), Two-dimensional (matrix/table).
Accessing: Elements are accessed via index, starting from 0.

Unit 4: Strings

Strings

String: A one-dimensional array of characters terminated by a null character ('\0').
Handling Functions: The <string.h> library provides functions like strlen() (length), strcpy() (copy), strcat() (concatenate), and strcmp() (compare).

Unit 5: Functions & Pointers

Functions & Pointers

Functions: Self-contained blocks of code performing a specific task. Supports modularity.
Recursion: A function calling itself.
Pointers: Variables that store the memory address of another variable. Operators: * (value at address) and & (address of).

Unit 6: Structures & Files

Structures & File Management

Structure: A user-defined data type grouping related variables of different data types.
Unions: Similar to structures but all members share the same memory location.
Files: Persistent storage. Operations include fopen, fclose, fprintf, fscanf.

👥 WhatsApp Community
📱

Students' WhatsApp Community

Join for quick updates, paper discussions and doubt help.

✅ Students-only
📎 Notes & resources
🕘 Active threads
📢 Announcements
🔗 Join Community

By joining you agree to follow group rules. Admins may remove spam accounts.

Summer 2025 Paper

Winter 2024 Paper