University of Madras - Syllabus of Bachelor of Science (BSc) Physics - Semester VI - Application Oriented Subject - Computer Programming - C Language
UNIVERSITY OF MADRAS
B.Sc. DEGREE COURSE IN Physics
SEMESTER SYSTEM WITH CREDITS
(Effective from the Academic Year 2003-2004)
SYLLABUS
Semester VI - Application Oriented Subject - Computer Programming - C Language
Practical: 40
Record: 10
Total: 50
Unit I
Introduction: Importance of C -Basic structure of C programs - Programming Style.
Constants, Variables and Data Types: Character set, Keywords and Identifiers - Constants - Variables - Data types - Declaration of variables - Assigning values to
variables.
Operators and Expressions: Arithmetic, relational, Logical, Assignment, Increment and decrement, conditional, bitwise, comma operators - Arithmetic expressions - Procedure and Associativity.
Unit II
Input Output Operator: getchar, putchar, Formatted output(printf) and formatted input (scanf)
Control Structure: Decision making with if, if-else, switch, goto, break and continue statements, while, do while, for statements.
Arrays: One-dimensional and two-dimensional arrays, declaring arrays, storing arrays in memory - initialising arrays.
Unit III
Functions:
Basic functions - Return values and their types - calling functions - function arguments - external variables and scope rules.
Structures and Union: Structures - arrays of structures - arrays within structures - Structures - Structures and functions - Unions.
Unit IV
Pointers:
Pointers and functions - arguments - Pointers and arrays - address arithmetic character pointers and functions - Pointer arrays - Point on Pointers.
Pre-processor: Macro substitution File inclusion - Compiler control directives - opening and cloing a file - reading and writing data - error handling - Random Access.
Unit V
Development of algorithm, flowchart and program for the following problems:
1. Average of a set of numbers.
2. Conversion of Fahrenheit to Celsius.
3. Solving quadratic equation.
4. Finding the factorial using recursion.
5. To add/subtract/multiply two matrices.
6. To find the smallest and largest element in an array.
7. Sorting a set of numbers in ascending/descending order.
8. To arrange the names in alphabetical order.
9. Numerical Integration by Trapezoidal/Simpson's rule.
10. Determination of roots b Newton-Raphson method.
Books for Study:
1. Programming in ANSI C by E. Balagurusamy, Tata McGraw-Hill.
2. Schaum's Outline Series - Theory and Problems of programming with C by Byron S, Gottfried, McGraw Fill Internationals.
3. Programming with C by Venugopal, K.R. and Sudep R.P., Tata McGraw Hill, 1998.
4. Teach Yourself C by Herbert Sehildt, Osborne, McGraw Hill.