|
CAM101: INTRODUCTION TO COMPUTER PROGRAMMING THROUGH C |
||||||||||||||||||||||||||||||||||||||||||||||||||
|
ODD SEMESTERS (updated July 2010)
General Course
Information:
Classes
: Theory - 04
& Laboratory - 06 per week. Location
: Theory - CS2, Laboratory –
CCML. Assessment : Periodical Tests, Assignments and Semester End Examination. Overlaps with : CSB01, MBIF101 & B.Sc.04-A Course Objectives & Prerequisites: This course aims to introduce the
students with Computer Programming Concepts, taking C language as the medium.
The course lays emphasis on foundations & basic principles of Computer
Programming. Beginning with elementary concepts, students will be presented with
detailed discussions on a variety of programming constructs and advanced
features of the C language. This course serves as first course
in Computer programming and does not requires any special knowledge of Computer
Science, except a basic familiarity with Digital Computers and Binary Numbers.
Course Syllabus: Basic Programming Concepts: Introduction to
the basic ideas of problem solving and programming using principles of top-down
modular design, Flowcharts, Abstraction Mechanisms, Stepwise Refinement.
Syntactic Elements of a Language, General Syntactic Criterion, Formal Definition
of Syntax, Semantics, Storage Management. Introduction to Programming
Language C: Data Types, Instruction and its Types, Storage Classes, Operators
and Hierarchy of Operations,
Expressions in C,
Control and
Repetitive Statements,
break, continue, Functions: User
Defined Functions and Library Functions, Local and Global Variables, Parameter
Passing, Pointers, Arrays, Strings, C Preprocessors, Structures, Input and
Output in C, C-Library. Introduction to the Major Programming
Paradigms: Imperative Language, Object Oriented Languages, Functional Languages,
Logic Languages, Parallel Languages etc.
Text Books:
1.
Kernighan & Ritchie, The C Programming Language,
Pearson Education, 2/e.
2.
Reference Books:
1. R. Sethi, Programming Languages, Addison-Wesley, 1996 2. B.S.Gottfried, Schaum's Outline of Theory and Problems of
Programming with C, Tata McGraw-Hill.
3.
H.Schildt, C Made Easy, Osborne McGraw-Hill. Lecture Plan:
Laboratory Assignment 01 (To be submitted before 1st periodical test 1. Write a Program to compute the Factorial value of a given integer. Use it to sum a given series.
2. Write a Program to implement Sequential & Binary Search techniques on a given list of numbers.
3. Write a Program to sort a given list of numbers in ascending order, using: (a) Bubble Sort (b) Selection Sort (c) Quick Sort (d) Merge Sort
4. Write a Program to perform following matrix operations: (a) Compute transpose of a matrix (b) Multiply two matrices.
5. Write a Program to perform the following String Processing: (a) To read a line of text and count the number of characters & words in it. (b) To search for all the occurrences of a given sub string and replace it by its reverse.
6. Write a Program to convert a positive integer into its Binary, Octal & Hexadecimal equivalent.
7.
Write a Program to solve the
8. Write a Program to copy the contents of one file to another. The program should read the file names at command prompt.
9. Write a function rightrot (x , n) that returns the value of the integer x rotated to the right by n bit positions.
10. Write a Program to create a linked list of items. Write functions for displaying the contents and inserting & deleting an item from the list.
11. Write a Program to create a Stack containing numbers. Write appropriate functions for Push and Pop operations.
12. Write a Program to create a Queue of items. Write appropriate functions for insertion and deletion operations. Laboratory Assignment 02 (To be submitted before 2nd periodical test) and braces. Ignore the Comment lines.
2. Write a Program for Date Conversion, i.e., if a date (dd-mm-yyyy) is entered from the keyboard, the program should return the day of the month and the day of the year. The program should check for invalid dates and should take into account the leap years.
3. Write a Program expr which evaluates a reverse Polish expression from the command line, where each operator or operand is a separate argument. For ex. expr 2 3 4 + * should evaluate to 2 * (3 + 4).
4. Write a Cross reference program that prints a list of all words in a document, and, for each word, a list of the line numbers on which it occurs.
5. Write a Program in C on UNIX which returns ids of a process, its parent and of all its children.
6. Write the C equivalent for UNIX command ls to list the files in a directory.
Semester End Examination 3rd - 4th Week of November Question Papers (Previous years) (PDF Files)
|