Computer Programming
First Year • Semester 1 • NEP Syllabus
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.
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).
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.
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.
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).
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).
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.
Students' WhatsApp Community
Join for quick updates, paper discussions and doubt help.
By joining you agree to follow group rules. Admins may remove spam accounts.