LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
M.Sc. DEGREE EXAMINATION – PHYSICS
THIRD SEMESTER – NOVEMBER 2010
PH 3812 – NUMERICAL METHODS AND C PROGRAMMING
Date : 03-11-10 Dept. No. Max. : 100 Marks
Time : 9:00 – 12:00
PART – A
Answer ALL questions. (10 x 2 = 20)
- Dsitingush between Trapezoidal and Simpson’s rules of integration.
- Reduce y = aebx to linear form.
- Give the use of the comma operator in C.
- Write a simple C program to find whether a given number is even or odd.
- List the logical operators in C.
- Explain operator precedence in C language.
- With an example explain “array initialization”.
- Explain the use of break statement in C with an example.
- Mention any two advantages of pointers.
- Give the general format of a union.
PART – B
Answer any FOUR questions. (4 x 7.5 = 30)
- Evaluate using Lagrange’s interpolation formula the value of f (9) from the following table:
X | 2 | 5 | 8 | 11 |
f(x) | 94.8 | 87.9 | 81.3 | 75.1 |
- Evaluate the integral using Trapezoidal rule with h=0.05.
- Solve by Modified Euler’s method, dy/dx = 1 – y, for x=0.2, given y(0)=0, h=0.1.
- Solve the following simultaneous equations by Gauss-Jordan method:
2x + 3y – z = 5
4x + 4y – 3z = 3
2x – 3y + 2z = 2
- Use the method of least squares to fit a straight line to the following data:
X | 0 | 1 | 2 | 3 | 4 |
Y | 1 | 1.8 | 3.3 | 4.5 | 6.3 |
Hence estimate the value of Y when X=2.5.
PART – C
Answer any FOUR questions. (4 x 12.5 = 50)
- Develop a program to compute a missing value using Lagrange’s Interpolation.
- Write a program in C to solve a differential equation using the fourth order Runge-Kutta method.
- Develop C programs to
- find the greatest of three numbers (5)
- to find whether a number is Armstrong (7)
- Design a C program to multiply two 3 x 3 matrices.
- Using switch…case design a program in C to determine the overall grade obtained by a student
based on scores in 5 subjects.
Latest Govt Job & Exam Updates: