Bidyanagar, Mahura, Janla, Bhubaneswar - 752 054 (Orissa) : C.V.Raman College of Engineering

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

C.V.

Raman College of Engineering,


(An autonomous Institute affiliated to BPUT, Odisha)
Bidyanagar, Mahura, Janla, Bhubaneswar - 752 054 (Orissa)

REF NO: To be filled by CD office

CS10101 :: COMPUTER PROGRAMMING

Credits: 03 Teaching Scheme: Theory 03 Hrs/Week

Prerequisites:

1. Knowledge of computer fundamentals.


2. Knowledge of basic mathematics.
3. Ability to apply logic.

Objectives: The objectives of this course are:

1. To provide a comprehensive study of the C programming language.


2. To utilize the strengths of C to enable the students for writing efficient codes.
3. To learn and acquire art of computer programming.
4. To model physical problems in to relevant programs.

Course Details:

Unit 1: Introduction to Programming: (8 Hrs)

U1.1. Basic functional units of a computer and their utility. Problem solving using
computers and logic design. Algorithms and their representations: flowcharts,
pseudo code. Designing algorithms. Efficient algorithm writing techniques.
Concept of programming languages for implementing algorithms – levels of
languages. Role of assemblers, compilers, linker, loader, interpreter in program
execution.
U1.2. Introduction to C: “Hello World” in C – editor, compiler, execution environment. C
as a middle level language. Basic structure of C program, standard library and
header files, Syntax and Semantics. Input-output statements, Formatted
input/output statements. Variable, constant (literal and named), Data types,
variable declaration. Assignment. Operators: Arithmetic, logical, relational,
Expressions, Precedence & Associativity. Input and output statements, escape
sequences.
U1.3. Self Study: Bits and bytes – importance of digital representation in computers.
Number System and algorithms for inter conversions. C programming
environments.

Unit 2: Flow of Control: (8 Hrs)

U2.1. Selection Statement: if, nested if–else, Conditional Expression, Switch


statements. Iteration Statements: for loop, while loop, do -while loop, nested loop.
Statements: go to, break & continue. Common programming errors. Application
of C constructs in solving problems like generating arithmetic and geometric
progression.
U2.2. Arrays: Concept, declaration and initialization of arrays, accessing individual
elements of array. Use of arrays in sorting, searching. Concept of 2-D array
(Matrix), row major and column major representation of array, address calculation
for accessing the individual element. Stacks & Queue.
U2.3. Self Study: Concepts of Sparse Matrix, Multi Dimensional array.

Unit 3: Functions: (8 Hrs)

U3.1. Need of functions, function declaration, definition and call. Inbuilt functions and
user defined functions. Passing arguments to a function, returning values from a
function. Scope of variable, local and global variable. Access specifiers. Passing
arrays to functions.
U3.2. Recursive Functions: Need of Recursion, direct recursion, indirect recursion,
impact of recursion on local& global variables, examples of recursive programs –
factorial, progressions, towers of Hanoi. Recursive vs Iterative solutions.
Disadvantages of recursion.
U3.3. Self Study: Preprocessor and preprocessor directives: macro substitution,
difference between macro and functions.

Unit 4: Pointers & Strings: (8 Hrs)

U4.1. Concept of pointers, relevance of data type in pointer variable, pointer arithmetic.
Pointer to pointer. Pointers and functions (passing pointers to functions, returning
pointers from functions). Pointers and arrays. Constant Pointer. Array of pointers,
pointer to array. Array accessing using pointers.
U4.2. Strings: Strings as arrays, character array versus strings, reading and writing
strings, String handling functions, user defined functions for string operations –
copy, concatenate, length, reverse, converting case, appending, comparing two
string, extracting a substring. Pointers and strings. Array of strings.
U4.3. Self Study: String matching and implementation.

Unit 5: Structures & File Handling in C: (8 Hrs)

U5.1. Structures: Declaration and initialization, structure variables, accessing and


assigning values of the fields, "sizeof" operator, functions and structures, arrays of
structures, nested structures, pointers and structures, passing structure to a
function and returning structure from function.
U5.2. Dynamic memory allocation, type casting, Introduction to self referential
structures, Linked List.
U5.3. 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.
U5.4. Self Study: Typedef keyword. Union, Nesting of Structure and Union.
Enumerated data types.

Note: Five assignments to be given to the students on self study, comprising of one
assignment from each unit.

Text Books:

T1. “Programming language – ANSI C”, Brain W Kernighan and Dennis Ritchie,
Second edition ISBN 0-13-110370-9
T2. “C Programming”, Balagurusamy, Tata McGraw-Hill
T3. Programming with C- Schaum’s outline Series”, B. Gottfried, Second edition, Tata
McGraw Hill Publication, ISBN 0-07-463491-7

Reference Books:

R1. “A first book of C- Fundamental of C Programming”, Gary Bronson and Stephen


Menconi, ISBN: 0314073361 (At&T Professional Series)
R2. “Computer fundamentals and Programming in C”, Reema Thareja, Oxford
University Press, ISBN:0-19-807888-9
R3. “Let us C”, Y. Kanetkar, Second Edition, BPB Publication. ISBN: 8176566217.
REF NO: To be filled by CD office

CS10302 :: COMPUTER PROGRAMMING LABORATORY

Credits: 01 Teaching Scheme: Laboratory 02 Hrs/Week

Prerequisites:

1. Basic knowledge to handle a computer system.


2. Basic knowledge of Linux and Windows Operating System.
3. Fundamental knowledge about flow chart and algorithm .

Objectives: The objectives of this laboratory course are:

1. Acquire knowledge about the basic concept of writing a program.


2. Understand the basic concept of C Programming, and its different modules .
3. Role of Functions involving the idea of modularity.
4. Concept of Array and pointers dealing with memory management.
5. Structures and unions through which derived data types can be formed
6. File Handling for permanent storage of data or record.
7. To make students familiar with programming using gcc compiler in Linux.

Course Details:

1. Study of important DOS/UNIX commands.


2. Study of Formatted input/output statements.
3. Study of Selection, Switch and Iteration Statements.
4. Study of Concept of Functions & Recursion.
5. Study of Concept of Arrays.
6. Study of Concepts of Pointers & Strings.
7. Study of Concepts of Structures, Unions and Files.

List of Sample Programs:

1. Study of most important DOS/UNIX commands.


2. Write a program in C to find largest element / average of given N elements / sum /
reverse of a given integer.
3. Write a program in C to implement a simple mathematical calculator
4. Write a program in C to read an integer and display each of the digits of an integer
in English.
5. Write a C program to generate all the prime numbers between 1 and n, where n is
a value supplied by the user.
6. Write a program in C to perform Addition / Subtraction / Multiplication of two
Matrices. Also determine whether the matrix is symmetric / skewed.
7. Write a program in C to carry out following operations on strings using string
library

(a). Length of a string


(b). Copy a string.
(c). Concatenation of strings.
8. Write a program in C to carry out following operations on strings without using
string library functions

(a). Compare two strings.


(b). Reverse given string.
(c). To check if the given string is a palindrome or not

9. Write a program in C to carry out following operations on strings using

pointers. (a). Length of a string.


(b). Concatenation of
strings. (c). Copy of string
(d). Compare two strings

10. Write a C program that works with complex numbers using a structure. Perform
the following operations:

(a). Reading a complex number.


(b). Addition of two complex
numbers. (c). Writing a complex
number.
(d). Multiplication of two complex numbers.

11. Write a C program to create a database of students by using array of structure


and perform following operations on it.

(a). Accept/modify record of student


(b). Search a particular record
(c). Display all records

12. Write a program in C that use both recursive and non-recursive functions to find
the Factorial / GCD (greatest common divisor) of two given integers / Fibonacci
series.
13. Write a program in C to sort n integers using bubble / merge sort.
14. Write a program in C to search a number in a given list using linear / binary
search.

Text Books

T1. “Programming with C- Schaum’s outline Series”, B. Gottfried, Second edition,


Tata McGraw Hill Publication, ISBN 0-07-463491-7,
T2. “Let us C”, Y. Kanetkar, Second Edition, BPB Publication. ISBN: 8176566217.

Reference Books

R1. “Programming language – ANSI C”, Brain W Kernighan and Dennis Ritchie,
Second edition ISBN 0-13-110370-9,
R2. “A first book of C- Fundamental of C Programming”, Gary Bronson and Stephen
R3. “Projects using C”, P V N Varalakshmi, Sci-tech Publications (2009)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy