LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
M.Sc. DEGREE EXAMINATION – PHYSICS
THIRD SEMESTER – NOVEMBER 2012
PH 3812 – NUMERICAL METHODS AND C PROGRAMMING
Date : 06/11/2012 Dept. No. Max. : 100 Marks
Time : 9:00 – 12:00
PART – A
Answer ALL questions: (10×2=20)
- Describe the structure of a C program.
- Distinguish between main() and void main(void).
- Write a C program to output the multiplication table.
- Check whether the following numeric constants are valid. Give reason.
- a) 67845L b) 25,000 c) +5.0E3 d) 7.1e 4 e) $ 285
- How do variables and symbolic names differ?
- Develop a C program to convert lowercase letter to upper case and vice-versa.
- Apply Simpson’s 1/3 rd rule to estimate the value of the integral by dividing the interval (1,2) into four equal parts.
- Given that f(0)=8, f(1)=68 and f(5)=123 ,construct a divided difference table. Using the table determine the value of f(2).
- Differentiate between break and continue statements.
- Briefly explain the various data types in C language.
PART – B
Answer any FOUR questions : (4×7.5=30)
- Using Newton’s formula for interpolation with x and y given values and find f(7.5) for the data given below.
X | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
F(x) | 1 | 8 | 27 | 64 | 125 | 216 | 343 | 512 |
- Using Newton-Raphson’s method find correct to four decimal places, the roots lying in the interval 0 and 1 for the equation x3-6x+4=0.
- Write a C program to evaluate the sum of the digits of a given number.
14 Determine y by Lagrange’s formula when x=35, for the data given below.
x | 25 | 30 | 40 | 50 |
y | 52 | 67.3 | 84.1 | 94.4 |
- Write a C program to perform integration of a function using Trapezoidal rule.
PART – C
Answer any FOUR questions : (4×12.5=50)
- Given that dy/dx=1+y2, where y=0, when x=0, Find y(0.2) and y(0.4) by using Runge-Kutta method of order four.
- Develop a C program to find the transpose of a matrix.
- Find the value of y for x=0.2 when dy/dx=log(x+y) with the initial condition that y=1 for x=0 by using Euler’s modified method.
- Solve the following simultaneous equations by Gauss-Jordan method
x1+2x2+x3=8; 2x1+3x2+4x3=20; 4x1+3x2+2x3=16.
- i) Discuss the various storage classes in C with suitable examples.
- ii) Write a C program to accept a sequence of characters and find the number of vowels and consonants using switch statement.
Latest Govt Job & Exam Updates: