ONE USICT logoONE USICT
← Streams
ICT-101Theory3 credits · L3

Programming for Problem Solving

Offered in Semester 1 for CSE, IT, ECE, CSE-AI, CSE-DS · Prerequisites: None

01Syllabus (unit-wise)

Official topics from the 2025-26 syllabus, unit by unit.

IUnit I

Structure of a C program, Basic data types (int, char, float, double, bool, fixed-width integers), Declarations and initializations, Constants using const and #define, Operators and expressions (arithmetic, relational, logical, bitwise, assignment, conditional, increment/decrement), Type conversions (implicit, explicit casting), Input/output (printf, scanf, format specifiers), Compound statements (blocks), Conditional statements (if, if-else, else-if, switch), Loops (while, do-while, for, infinite loops, early exit), break, continue, goto, return, Algorithm development including flowcharts, pseudocode representation, Tracing and dry run, structured programming. C89, C99, C11 and C23 extensions and usage

IIUnit II

Function declaration, definition, and invocation, Argument passing (by value, recursion), Inline functions and macro functions, Storage classes (auto, static, extern, register, thread_local), Scope and lifetime of variables, Header files and modular program design, One- and two-dimensional arrays (declaration, access, memory layout), Bubble sort, selection sort, insertion sort, linear and binary search, String input/output (gets, puts, fgets, fputs), Standard string manipulation (strlen, strcpy, strcat, strcmp, etc.), Arrays of strings, Command-line arguments. Root finding of a positive floating point number.

IIIUnit III

Structures (struct definition, nested structures, array of structures, pointer to structures), Unions (union, use- cases, memory layout), Enumerated types (enum, typedef enum), Bit fields, Memory layout and alignment, Pointers (declaration, dereferencing, pointer arithmetic, arrays vs pointers, pointer to pointer), Dynamic memory allocation (malloc, calloc, realloc, free), Memory leak prevention, NULL and null pointer checks, Compound literals, Representation and Arithmetic on polynomials with floating point coefficients. Matrices and arithmetic operations on them (addition, subtraction and multiplication). File I/O (opening, closing, reading, writing text and binary files, fopen, fclose, fprintf, fscanf, fread, fwrite, fgets, fputs), Error handling using errno, Command-line parameters

IVUnit IV

Abstract Data Types (ADTs), Singly and doubly linked lists, Stack (array and linked list implementation), Infix-to- postfix conversion, Parenthesis balancing, Queue (linear, circular, priority) (array and linked list implementation), Traversal, insertion, deletion in lists, Binary tree basics (creation, inorder, preorder, postorder traversal), Function pointers, Pointers to arrays and functions, Idea of Generic code using macros, _Generic for type-generic programming, Assertions and diagnostics (assert, _Static_assert), Safer macros and expressions, Forward declaration, Program segmentation, Header hygiene, recursion.

02Marking scheme

How this paper is evaluated

1. Teachers Continuous Evaluation: 40 marks 2. Term-End Semester Examinations: 60 Marks

03Course outcomes

What you should be able to do after this course

CO1

Ability to develop simple algorithms for arithmetic and logical problems and implement them in ‘C'.

CO2

Ability to implement conditional branching, iteration and recursion and functions in ‘C'

CO3

Ability to use arrays, pointers, union and structures to develop algorithms and programs in ‘C'.

CO4

Ability to decompose a problem into functions and synthesize a complete program using divide and conquer

04Books

Prescribed textbooks and references

Textbooks

  1. 01The C programming language, B W Kernighan and D M Ritchie, Pearson Education, 1988.
  2. 02Modern C, Jens Gustedt, O’Reilly, 2020
  3. 03ISO/IEC 9899-XXXX, The ISO Standard for the C language.

References

  1. 01Modern C, Zoran Pavlovic, Manning Publications, 2020
  2. 0221st Century C, Ben Klemens, O’Reilly Media, 2014
  3. 03C: How to Program, Paul Deitel and Harvey Deitel, 8th Edition, Pearson, 2016
  4. 04Engineering Problem Solving With C, Delores M. Etter, Pearson, 2013.
  5. 05Problem Solving and Program Design in C, Jeri R. Hanly and Elliot B. Koffman, Pearson, 2016.
  6. 06C Programming: A Modern Approach, K. N. King, W. W. Norton, 2008
  7. 07MIT 6.087 Course Notes, Practical C Programming