Вы находитесь на странице: 1из 4

First Semester

CS1B01: Problem Solving and C Programming


Course Number: 4
Contact Hours per Week: 1
Theory Number of Credits: 3
Number of Contact Hours: 15 Hrs.
Aim of the Course:
To equip the students with fundamental principles of Problem Solving
aspects.
To learn the concept of programming
To study C language
To equip the students to write programs for solving simple computing
problems
Prerequisites:
Background of the basic science at +2 level.
Course Outline:
Module 1 - [3 Hours]:
Introduction : The problem solving aspect, Top-down design, Imple-
mentation of algorithms, Program verication, eciency of algorithms.
Introduction to C Programming, overview and importance of C, C Pro-
gram Structure and Simple programs, Creation and Compilation of C
Programs under Linux and Windows Platforms.
4
B.Sc. Computer Science - 2012 Admission onwards.
Module 2 - [3 Hours]:
Elements of C Language and Program constructs. Character Set,C To-
kens, Keywords and Identier, Constants, Variables, Data types, Vari-
able declaration and assignment of values, Symbolic constant denition.
C-Operators, Arithmetic operators, relational operators, and logical op-
erators, assignment operators, increment and decrement operators, con-
ditional operators, special operators, arithmetic expressions, evaluation
of expressions, precedence of arithmetic operators, Type conversion in
expressions, operator precedence and associativity, Mathematical Func-
tions, I/O operations.
Module 3 - [3 Hours]:
Decision making, Branching and Looping. Decision making with IF
statement, Simple IF statement, If. . .else statement, Nesting of If. . .else
and else. . .if Ladder, Switch statement, Conditional operator, Go-to
statement. Looping: While loop, Do-While, and For Loops, Nesting
of loops, jumps in loop, skipping of loops.
Module 4 - [3 Hours]:
Array & Strings - One dimensional array, two dimensional array and
multi-dimensional array, strings and string manipulation functions. The
Concept of modularization and User dened functions-Multi-function
Program, calling functions, various categories of functions, Nesting of
functions and recursion, functions and arrays, scope and life-time of vari-
ables in functions, multi-le programs. Structures & Union structure
denition , giving values to members, structure initialization, compari-
son of structure variables, arrays of structures, arrays within structures,
structures within arrays, structures and functions, Unions, bit-elds.
Module 5 - [3 Hours]:
Pointers and Files: Understanding pointers, accessing the address of a
variable, declaring and initializing pointers, accessing a variable through
its pointer, pointer expressions, pointer and arrays, pointer and char-
acter string, pointers and functions, pointers and structures, pointer to
pointer - dynamic memory allocation.
Files : Dening, Opening and closing les - i/o operations on les - error
handling on lesrandom access of lescommand line operations.
Preprocessor directives: Macro substitution directives - simple macros
- macros with arguments - nesting of macros, Compiler control directives.
5
B.Sc. Computer Science - 2012 Admission onwards.
Text Books:
1. Programming in ANSI C by E. Balaguruswami.
References:
1. The C Programming Language by Brian W. Kernighan & Dennis
M. Ritchie.
2. Let us C by Yashavant P. Kenetkar.
3. Byran Gotfried, Schaums Outline series- Programming with C.
CS1B02: Lab I C Programming Lab
Course Number: 5
Practical Hours per Week: 2
Number of Credits: 1
Number of Contact Hours: 24 Hours.
Aim of the Course:
To make the students learn programming environment.
To practice programming.
To make the students equipped to solve mathematical or scientic prob-
lems using C.
Prerequisites:
Knowledge in operating computer.
Course Outline:
Experiments should include but not limited to :
Lab 1: Simple C Programs like Computation of area of a circle, rectangle etc.
Lab 2: C Programs using Loops (like pyramid printing, factorial computa-
tion, number reversing etc. )
6
B.Sc. Computer Science - 2012 Admission onwards.
Lab 3 : Programs involving Arrays (Searching, sorting and vector operations
etc.)
Lab 4 : Two dimensional arrays ( like Matrix operations)
Lab 5 : String Manipulations
Lab 6 : Programs involving Structures (like addition of Two Complex num-
bers, student record creation and manipulation etc.)
Lab 7 : Programs involving Union
Lab 8 : Programs involving functions
Lab 9 : Recursion ( recursive function to compute a factorial, reverse string
etc)
Lab 10 : Pointers - simple programs to learn concept of pointers, array op-
eration using pointers etc.
Lab 11 : File operations
Lab 12 : Command line arguments copy a le, delete a le etc.
Projects:
1. Design a Scientic Calculator and include as many functions as possible
2. Prepare rank list for nding the topper in the considering the grade
obtained in various subjects.
3. Develop a telephone directory.
4. Write a program for sorting a list of input elements. User should be able
to give an option for ascending order or descending order. Use command
line arguments.
Note:
All lab works should be neatly recorded in a Laboratory Record Book in
written form. However Program results can be pasted in the left hand side
of the fare record. All students should have a rough record (observation note
book ) too, in which they write all the works to be carried out in the lab prior
to his/her entering the lab. He/She may also note down the i/p and o/p that
he gives for program verication in the observation note book(rough record).
7

Вам также может понравиться