PROGRAMMING AND PROBLEM SOLVING

advertisement
NU BCA First Year Syllabus 1st Semester (PPC:104)
Paper Code
: PPC:104
Paper name
: PROGRAMMING AND PROBLEM SOLVING THROUGH ‘C’ LANGUAGE
Objective of the Course
The objectives of this course are to make the student understand programming language,
programming, concepts of Loops, reading a set of Data, stepwise refinement, Functions, Control
structure, Arrays. After completion of this course the student is expected to analyze the real life
problem and write a program in ‘C’ language to solve the problem. The main emphasis of the course
will be on problem solving aspect i.e. developing proper algorithms.
After completion of the course the student will be able to
• Develop efficient algorithms for solving a problem.
• Use the various constructs of a programming language viz. conditional, iteration and recursion.
• Implement the algorithms in “C” language.
• Use simple data structures like arrays, stacks and linked list in solving problems.
• Handling File in “C”.
Teaching Hours (Per
Week)
TH.
(hours)
Pr. (hours)
4
Examination Scheme
Internal
External
Th. (marks)
Th. (marks)
30
70
Lectures
Total
100 (marks)
=
68 Hours
Detailed Syllabus
UNIT I
Introduction to Programming
04 Hrs.
How to develop a program, Algorithms, Flow-charts, Types of Programming Languages,Compiler and
Linker, Testing and Debugging a program, Documentation.
Constants, Variables & Data Types
04 Hrs.
Character set, C Tokens, Identifiers and Keywords, Constants, Variables, Data types,Declaration of
variables, declaration of storage class, assigning values to variables, defining symbolic constants,
declaring a variable as constant, declaring a variable as volatile, overflow and underflow of data.
Operators & Expressions
07 Hrs
Page 1 of 3
NU BCA First Year Syllabus 1st Semester (PPC:104)
Arithmetic operators, Relational, Logical operators, Assignment, increment and decrement
operators, conditional operators, bitwise operators, special operators, arithmetic expressions,
evaluation of arithmetic expressions, precedence of arithmetic expressions, some computational
problems, type conversion in expressions, operator precedence and associativity, mathematical
functions.
Managing Input & output operations
02 Hrs
Reading a character, writing a character, formatted input, formatted output.
UNIT II
Decision Making – Branching & Looping
06 Hrs.
Decision making with IF statement, switch statement, ? : operator, goto statement.
While statement, do-while statement, for statement, Jumps in loops,
Arrays
05 Hrs.
One dimensional array: Array Manipulation, Different operations on one dimensional arrays, two
dimensional array, operations on two dimensional arrays, multi-dimensional array, dynamic arrays.
Handling of Character Strings
05Hrs
Declaring and initializing string variables, reading string from terminal, writing string to screen,
putting strings together, comparison of two strings, string handling functions, table of strings.
UNIT III
Functions
08 Hrs.
Top down approach of problem solving, standard library functions, passing values between
functions, scope rules of functions, calling convention, return type of functions, call by value and call
by reference, recursive functions.
Storage Classes
Scope and extent, Storage Classes in a single source file: auto, extern and static, register,
Structures and Unions
07 Hrs.
Defining a structure, Declaring Structure variables, accessing structure members, structure
initialisation, copying and comparing structure variables, operation on individual members, arrays of
structures, arrays within structures, structures and functions, union, size of structure, bit fields.
UNIT IV
Pointers
09 Hrs.
Understanding pointers, accessing the address of a variable, declaring pointer variables, initialisation
of pointer variables, accessing a variable through its pointer, chain of pointers, pointer expression,
Page 2 of 3
NU BCA First Year Syllabus 1st Semester (PPC:104)
pointer increment and scale factor, pointer and arrays, pointers and character strings, array of
pointers, pointers as function arguments, functions returning pointers, pointers to functions,
pointers and structures.
Dynamic Memory Allocation and Link List
06 Hrs.
Dynamic Memory Allocation, Allocation a Block of memory: malloc, allocating multiple blcoks of
memory: calloc, releasing the used space: free, Altering the size of a block: realloc.
Concept of Link list, advantages of link lists, types of link list, pointers revisited, creating a linked list,
inserting an item, deleting an item, application of linked lists.
UNIT V
File Processing
05 Hrs.
Defining and Opening a file, closing a file, input/output operations on files, error handling during I/O
operations, random access to files, Command Line Arguments.
RECOMMENDED BOOKS
MAIN READING
1. E. Balagurusamy, “Programming with ANSI-C”, Fourth Edition,2008, Tata McGraw Hill.
2. R.G. Dromey, “How to solve it by Computer”, Pearson Education, 2008.
3. Kanetkar Y, “Let us C”, BPB Publications, 2007.
4. Hanly J R &Koffman E.B, “Problem Solving and Programm design in C”, PearsonEducation, 2009.
SUPPLEMENTARY READING
1. Byron S Gottfried “Programming with C” Second edition, Tata McGrawhill, 2007
2. Venugopal K. R and Prasad S. R, “Mastering ‘C’”, Third Edition, 2008, Tata McGrawHill.
3. B.W. Kernighan & D. M. Ritchie, “The C Programming Language”, Second Edition, 2001,Pearson
Education
4. ISRD Group, “Programming and Problem Solving Using C”, Tata McGraw Hill,2008.
5. PradipDey ,ManasGhosh, “Programming in C”, Oxford University Press, 2007.
Page 3 of 3
Download