0% found this document useful (0 votes)
18 views

btech-ice-3-sem-numerical-methods-and-programming-2010

Uploaded by

sarkar50626
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

btech-ice-3-sem-numerical-methods-and-programming-2010

Uploaded by

sarkar50626
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Name : ……………………………………………………………

Roll No. : ……………………………………………..…………..


Invigilator’s Signature : ………………………………………..
CS/B.Tech (IT,ECE,EEE,ICE)/SEM-3/M(CS)-312/2010-11
2010-11
NUMERICAL METHODS AND PROGRAMMING
Time Allotted : 3 Hours Full Marks : 70

The figures in the margin indicate full marks.


Candidates are required to give their answers in their own words
as far as practicable.

GROUP – A
( Multiple Choice Type Questions )

1. Choose the correct alternatives for any ten of the


following : 10 × 1 = 10

i) The ratio of absolute error of the true value is called

a) relative error b) absolute error

c) truncation error d) inherent error.

ii) The significant digit of 0·0001234 is

a) 7 b) 4

c) 8 d) 6.

iii) The percentage error in approximating 4/3 to 1·3333 is

a) 0·0025% b) 25%

c) 0·00025% d) 0·25%

3102 [ Turn over


CS/B.Tech (IT,ECE,EEE,ICE)/SEM-3/M(CS)-312/2010-11

iv) Given a pointer, ptr to a structure stru containing a


member name. Which of the following correctly
references name ?

a) ptr → stru → name b) ptr.name

c) ptr → stru.name d) ptr.str.name

v) With every use of a memory allocation function, what


function should be used to release allocated memory
which is no longer needed ?

a) unalloc( ) b) free( )

c) dealloc( ) d) dropmem( ).

vi) Which operator cannot be overloaded ?

a) cout b) cin

c) ++ d) ::

vii) Which one of the following will read a character from the
keyboard and will store in the variable c ?

a) c=getc( ); b) getc(&c);

c) getchar(&c); d) c=getchar( );

viii) If the interval of differencing in unity and f ( x ) = ax 2

( a is constant ), which one of the following choices is


wrong ?
!
a) "f ( x ) = a(2x + 1) b) "2 f ( x ) = 2a

c) "3 f ( x ) = 2 d) "4 f ( x ) = 0 .

! !
3102 2
! !
CS/B.Tech (IT,ECE,EEE,ICE)/SEM-3/M(CS)-312/2010-11

ix) In Simpson’s 1/3 rule of finding " f ( x ) dx, f ( x ) is


a

approximated by

!
a) line segment b) parabola

c) circular sector d) part of ellipse.

x) If f (0) = 12, f (3) = 6 and f (4) = 8 , then the linear

interpolation function f ( x ) is

! !
a) x 2 " 3x + 12 b) x 2 " 5x
!
c) x 3 " x 2 " 5x d) x 2 " 5x + 12 .
! !
xi) Runge-Kutta formula has a truncation error which is of
! !
the order of

a) h2 b) h3

c) h4 d) h5.
! 1 !
xii) If f ( x ) = 2 , then the dividend difference f (a, b) is
x
! !
a+b
a) 2
(ab) !
!
a+b
b) " 2
(ab)
!
1
c)
a " b2
2

! 1 1
d) 2
" 2.
a b
!

3102 3 [ Turn over


!
CS/B.Tech (IT,ECE,EEE,ICE)/SEM-3/M(CS)-312/2010-11

GROUP – B
( Short Answer Type Questions )
Answer any three of the following. 3 × 5 = 15

2. Values of x ( in degrees ) and sin x are given in the following


table :

x ( in degree ) 15 20 25 30 35 40

f(x) 0·2588190 0·3420201 0·4226183 0·5 0·5735764 0·6427876

Determine the value of sin 38˚ by Newton’s backward


difference interpolation formula.

3. Find the positive real root of x 3 " x 2 " 1 = 0 using the bisection
method of 4 iterations.

4. ! the integral by Simpson’s 1/3 rule,


Estimate the value of
taking 4 strips.
3
1
"x dx
1

5. Solve by Taylor’s series method dy / dx = 1/ x 2 + y


( ) where
! y(4) = 4 . Compute the values of y ( 4.1 ).

6. Solve the system of linear! equations by Gauss-Jordan


! method :

2x + y + z = 0

3x + 2y + 3z = 18

x + 4y + 9z = 16

3102 4
CS/B.Tech (IT,ECE,EEE,ICE)/SEM-3/M(CS)-312/2010-11

GROUP – C
( Long Answer Type Questions )
Answer any three of the following. 3 × 15 = 45

7. a) Write a C program to multiply two matrices of order

3 × 3 by using pointer method. What do you mean by

recursive function ? Explain with the help of example.

b) Using matrix factorization method solve the following

system of equations :

x + 3y + z = 9

x + 4y + 2z = 3

x + 2y – 3z = 6. 7+8

8. a) Write a program in C to copy the contents of a text file

to another text file. Suppose the source file is named as

“input.txt” and destination file is named as “output.txt”.

b) How does an append mode differ from a write mode ?

What are the common uses of rewind ( ) and ftell ( )

functions ?

3102 5 [ Turn over


CS/B.Tech (IT,ECE,EEE,ICE)/SEM-3/M(CS)-312/2010-11

c) Find from the following table, the area bounded by the

curve and the x-axis from x = 7·47 to x = 7·52.

x 7·47 7·48 7·49 7·50 7·51 7·52

f(x) 1·93 1·95 1·98 2·01 2·03 2·06


8+3+4

9. a) Write a program in C using recursive function to

calculate the sum of all digits of any number.

2
b) Write a C program to integrate # (4x " 3x ) dx , where

lower and upper limits are 0 and 1 respectively, taking

h = 0·25. ! 7+8

10. a) Use the fourth order Runge-Kutta method to find the

value of y when x = 0·2 given that y = 0 when x = 0 and

dy / dx = 1 + y2 .

b) Apply Lagrange’s interpolation formula to find f ( x ) if


!

f ( 1 ) = 2, f ( 2 ) = 4, f ( 3 ) = 8, f ( 4 ) = 16 and

f ( 7 ) = 128.

c) Write a C program to solve the equation x 3 " 3x " 5 = 0

within ( 1, 2 ) by bisection method correct to 3 decimal

places. ! 5+5+5

3102 6
CS/B.Tech (IT,ECE,EEE,ICE)/SEM-3/M(CS)-312/2010-11

11. a) Solve the given system of equations :

10x + 2y + z = 9

2x + 20y – 2z = – 44

– 2x + 3y + 10z = 22

by Gauss-Seidel method.

b) Using Taylor’s method, obtain an approximate value of y

at x = 0·2 for the differential equation

dy
= 2y + 3e x , y(0) = 0 . 8+7
dx

3102 7 [ Turn over

You might also like