C.V.
Raman Global University
Bhubaneswar - 752 054 (Odisha)
Computer Science and Engineering
Subject Name: Programming for Problem Solving
Regulation Year: 2023-24
Course Code: Credit: 03
Course Category: Core Theory Contact hours: 3 Hrs/Week
Recommended Pre-requisite: Knowledge of computer fundamentals. Knowledge of basic
mathematics.
COURSE OUTCOMES:
CO1: Develops simple algorithms for arithmetic and logical problems and translate it to programs
& execution (in C language).
CO2: To implement conditional branching, iteration to solve problems and use of array.
CO3: To solve problems using strings, structures, and pointers.
CO4: To decompose a problem into functions and synthesize solutions for problems using modular
approach, structures, and dynamic memory allocation.
CO5: Develop programs to solve real world problems using preprocessors and files.
Course Details:
Unit 1: Introduction to Programming: (8 Hrs)
Programming Basics: steps to solve logical and numerical problems. Representation of Algorithm,
Flowchart/Pseudo code with examples, Program design and structured programming, Role of
assemblers, compilers, linker, loader, interpreter in program execution.
Introduction to C: Basic structure of C program, C compilation process with different stages,
standard library and header files, Syntax and Semantics. Simple input and output with scanf and
printf, formatted I/O, Introduction to stdin, stdout and stderr, variables (with data types and space
requirements), datatypes, literals, operators, expressions and precedence, Expression evaluation,
Storage classes (auto, extern, static and register), type conversion, command line arguments.
Unit 2: Flow of Control and Arrays (8 Hrs)
Conditional Branching and Loops: Writing and evaluation of conditionals and consequent
branching with if, if-else, switch-case, ternary operator, goto, Iteration with for, while and
do-while loops, use of break & continue statements, common programming errors.
Arrays: one- and two-dimensional arrays, creating, accessing, and manipulating elements of
arrays, solving logical problems using array.
C.V. Raman Global University
Bhubaneswar - 752 054 (Odisha)
Unit 3: Strings, Structures and Pointers: (8 Hrs)
Strings: Introduction to strings, handling strings as array of characters, basic string functions
available in C (strlen, strcat, strcpy, strstr etc.), arrays of strings, solving logical problems using
string.
Structures: Defining structures, initializing structures, unions, array of structures, nested
structures.
Pointers: Idea of pointers, Defining pointers, Pointer to pointer, Pointers to Arrays and
Structures, Pointers and strings, Use of Pointers in self-referential structures, usage of
self-referential structures in linked list (no implementation) Enumeration data type
Unit 4: Functions: (8 Hrs)
Functions: Designing structured programs, declaring a function, Signature of a function,
Parameters and return type of a function, passing parameters to functions, call by value,
Passing arrays to functions, passing pointers to functions, idea of call by reference, Some C
standard functions and libraries.
Recursion: Simple programs, such as Finding Factorial, Fibonacci series etc., Limitations of
Recursive functions.
Dynamic memory allocation: Allocating and freeing memory, Allocating memory for arrays
of different data types.
Unit 5: Preprocessor and File handling in C (8 Hrs)
Preprocessor: Commonly used Preprocessor commands like include, define, undef, if, ifdef,
ifndef.
Files: Text and Binary files, Creating and Reading and writing text and binary files, Appending
data to existing files, Writing, and reading structures using binary files, Random access using
fseek, ftell and rewind functions. File Handling in C: file types, file opening modes, file
handling I/O – fprintf, fscanf, fwrite, fread, fseek. File pointers. Implementing basic file
operations in C.
Text Books (minimum 3):
1. Brian W. Kernighan and Dennis M. Ritchie. 1988. “The C Programming Language” (2nd. ed.).
Prentice Hall Professional Technical Reference.
2. Herbert Schildt. 2000. “C: The Complete Reference” (4th. ed.). McGraw-Hill, Inc., USA.
3. E. Balagurusamy.2019.” Programming in ANSI C” (8th ed.). Tata McGraw-Hill, Inc
Reference Books (minimum 2)
C.V. Raman Global University
Bhubaneswar - 752 054 (Odisha)
1. S. K. Srivastava & Deepali Srivastava. 2009. “C in Depth” (3rd ed.). BPB Publications
2. Reema Thareja. 2023. “Computer fundamentals and Programming in C” (2nd ed.). Oxford
University Press
3. Y. Kanetkar . 2016. “Let us C” (15th ed.). BPB Publication.
Open Sources:
1. https://nptel.ac.in/courses/106/104/106104128/ (Introduction to Programming in C)
2. https://nptel.ac.in/courses/106/105/106105171/ (Problem solving through Programming in C)
Course Designed by:
Course Approved by: