Docsity

COMPUTER PROGRAMMING and numerical methods, exams, Study notes of Programming Languages

Toggle sidebar
bg1
Code No: R07A1EC10 Set No. 1
I B.Tech Semester Regular Examinations, June 2009
COMPUTER PROGRAMMING AND NUMERICAL METHODS
(Metallurgy & Material Technology)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
1. (a) What are the differences between constant and variable?
(b) Explain about arithmetic operators with examples. [8+8]
2. Give the comparison of switch statement with and nested if statement with exam-
ples. [16]
3. (a) Write short notes on pointer arithmetic.
(b) Explain pointer to pointer with an example. [8+8]
4. Write the definition for Structure and give the general format for declaring and
accessing members. [16]
5. Define ADT . Explain with an example . [16]
6. (a) Find the positive root x3- x = 1 correct to four decimal places by bisection
method.
(b) Find the parabola of the form y = ax2+ bx + c passing through the points
(0, 0), (1, 1) and (2, 20). [8+8]
7. (a) From the following data, estimate the number of persons having income be-
tween
I. 1000 - 1700
II. 3500 - 4000
Income Below 500 500-1000 1000-2000 2000-3000 3000-4000
No. of persons 6000 4250 3600 1500 650
(b) Find f(x) given the table [8+8]
X 0 1 4 5
f(x) 4 3 24 39
8. (a) Evaluate
5
R
0
dx
4x+5 by Simpsons one- third rule and hence find the value of
loge5 (n= 10)
(b) Given dy
dx =xy +y2, y (0) = 1, y (0.1) = 1.1169, y (0.2) = 1.2773,find y(0.3)
by Runge-Kutta method of order four and y(0.4) using Milne’s predictor-
correctormethod.
[8+8]
⋆⋆⋆⋆⋆
1 of 1
pf3
pf4

Partial preview of the text

Download COMPUTER PROGRAMMING and numerical methods, exams and more Study notes Programming Languages in PDF only on Docsity!

I B.Tech Semester Regular Examinations, June 2009 COMPUTER PROGRAMMING AND NUMERICAL METHODS (Metallurgy & Material Technology) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆ ⋆ ⋆ ⋆ ⋆

  1. (a) What are the differences between constant and variable? (b) Explain about arithmetic operators with examples. [8+8]
  2. Give the comparison of switch statement with and nested if statement with exam- ples. [16]
  3. (a) Write short notes on pointer arithmetic. (b) Explain pointer to pointer with an example. [8+8]
  4. Write the definition for Structure and give the general format for declaring and accessing members. [16]
  5. Define ADT. Explain with an example. [16]
  6. (a) Find the positive root x^3 - x = 1 correct to four decimal places by bisection method. (b) Find the parabola of the form y = ax^2 + bx + c passing through the points (0, 0), (1, 1) and (2, 20). [8+8]
  7. (a) From the following data, estimate the number of persons having income be- tween I. 1000 - 1700 II. 3500 - 4000

Income Below 500 500-1000 1000-2000 2000-3000 3000- No. of persons 6000 4250 3600 1500 650 (b) Find f(x) given the table [8+8] X 0 1 4 5 f(x) 4 3 24 39

  1. (a) Evaluate

∫^5

0

dx 4 x+5 by Simpsons one- third rule and hence find the value of loge 5 (n = 10) (b) Given dy dx = xy + y^2 , y (0) = 1, y (0.1) = 1. 1169 , y (0.2) = 1. 2773 , find y(0.3) by Runge-Kutta method of order four and y(0.4) using Milne’s predictor- correctormethod. [8+8]

I B.Tech Semester Regular Examinations, June 2009 COMPUTER PROGRAMMING AND NUMERICAL METHODS (Metallurgy & Material Technology) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆ ⋆ ⋆ ⋆ ⋆

  1. What is the structure of while statement? Write a C program to find the sum of series e = 1 + 1/1! - 1/2! + 1/3! -1/4!. [16]
  2. Explain about library functions with examples. [16]
  3. Write a program to find rank of a matrix using pointers. [16]
  4. Write the definition for Structure and give the general format for declaring and accessing members. [16]
  5. Define ADT. Explain with an example. [16]
  6. (a) Find the positive root x^3 - x = 1 correct to four decimal places by bisection method. (b) Find the parabola of the form y = ax^2 + bx + c passing through the points (0, 0), (1, 1) and (2, 20). [8+8]
  7. (a) i. Prove that δ = E^1 /^2 ∆. ii. Evaluate (∆^2 / E) x^3. (b) Find f(0.2)and f(5.8) by Newton’s formula using the data given below [8+8]

X : 0 1 2 3 4 5 6 Y : 176 185 194 203 212 220 220

  1. (a) Dividing the range into 10 equal parts, find the approximate value of

∫^ π 0

sin x dx

by (i) Trapezoidal rule (ii) Weddle’s rule. (b) Given (^) dxdy = x^2 (1 + y) , y (1) = 1, y (1.1) = 1. 233 , y (1.2) = 1. 548 , y (1.3) =

  1. 979 , evaluate y(1.4) by Adams-Bash forth method. [8+8]

I B.Tech Semester Regular Examinations, June 2009 COMPUTER PROGRAMMING AND NUMERICAL METHODS (Metallurgy & Material Technology) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆ ⋆ ⋆ ⋆ ⋆

  1. (a) What is the difference between algorithm & flowchart? (b) Write briefly about C tokens. [8+8]
  2. Give the comparison of switch statement with and nested if statement with exam- ples. [16]
  3. Write a program to find rank of a matrix using pointers. [16]
  4. Write the definition for Structure and give the general format for declaring and accessing members. [16]
  5. Write a program to evaluate the following expression X = A / B * C infix to postfix using stack. [16]
  6. (a) Find the positive root x^3 - x = 1 correct to four decimal places by bisection method. (b) Find the parabola of the form y = ax^2 + bx + c passing through the points (0, 0), (1, 1) and (2, 20). [8+8]
  7. (a) Given sin 45◦^ =0.7071, sin 50◦^ =0.7660, sin 55◦^ =0.8192, sin 60◦. Find sin 52◦, by using Newton’s interpolation formula. Estimate the error. (b) Find the first and second difference of the polynomial 3x^4 +8x^3 +3x^2 -27x+9. [8+8]
  8. (a) Evaluate

∫^3

0

dx 4+x^2 by trapezoidal rule and Simpsons 1/3rd rule.

(b) Given y′′^ + xy′^ + y = 0, y′(0) = 0, y(0) = 1 Find the value of y(0.1) using Runge- Kutta method of fourth order. [8+8]