You are on page 1of 12

SEMESTER - 3rd SEM.

MECHANICAL
SUBJECT - NUMERICAL ANALYSIS AND COMP. PROGRAMMING
UNIT 1
SN.
1
2

CAT QUESTIONS
1B1
1C1

1C2

1B2

1C3

1B3

LEVEL TYPE MARKS

TIME

Findtherootoftheequation
Xex=cos(x)usingtheRegula-Falsimethodcorrecttofourdecimalplaces.
Solvetheequations
10x1-2x2-x3-x4=3
-2x1+10x2-x3-x4=15
-x1-x2+10x3-2x4=27
-x1-x2-2x3+10x4=-9byGaussSeidaliterationmethod.
SolvebyGauss-Jordanmethod:
10x-7y+3z+5u=6
-6x+8y-z-4u=5
3x+y+4z+11u=2
5x-9y-2z+4u=7
DerivetheNewton-Raphsonformulafortheequationf(x)=0.Discussitsgeometrical
interpretation.
ApplyGaussEliminationmethodtosolvetheequations:
x+4y-z=-5
x+y-6z=-12
3x-y-z=4
Findtherealrootoftheequation(UsingNewtonRaphsonMethod)
xlog10x-1.2=0correcttofiveplacesofdecimal.

15

15

15

15

10

Explain the types of errors in brief. The hypotenuse and side of a right angletriangle are found by
measurement to be 75 and 32 respectively. If the possible error in the hypotenuse is 0.2 and that
1A1 inthesideis0.1.Findthepossibleerrorsinthecomputedangle.

10

Explain the difference between open and bracketing methods of root determination. Determine
the root of the equation, x sin x + x cos x =0, near x = p using Newton-Raphsons method correct
1B4 tothreedecimalplaces.

15

15

15

10

10

15

9
10
11
12
13
14

Explain, how round off errors can effect the results, determined using elimination method and how the
1A2 results can be improved using pivoting.
1C4 Solve the following equation by Gauss-Jordan method.
2x - 3y + z = -1
x + 4y + 5z = 25
3x - 4y + z = 2
x
1B5 Findarealrootof2x10g10 =7correcttofourdecimalplacesusing

iterationmethod.
2 3 4
Ifu=4x y /z anderrorsinx,y,zbe.001,computetherelativemaximum
errorinuwhenx=y=z=1.
1B7 Findthedoublerootoftheequation:
3
2
x x x+1=0
1C5 SolvethefollowingequationsbyGaussEliminationmethod
1B6

15

1B8

16

1B9

17

1A3

18

1B10

19

1B11

20

1B12

21

1B13

22

1C6

23

1C7

1B14
24
25

1C8

26

1B15

27

AB16

28

1A4

29

1C9

30
31

1C10

32

1A5

SEMESTER - 3rd SEM. MECHANICAL


SUBJECT - NUMERICAL ANALYSIS AND COMP. PROGRAMMING
2x+y+z=103x+2y+3z=18x+4y+9z=16
3
Findarealrootoftheequationx 2x5=0bythemethodoffalseposition
correcttothreedecimalplaces
Findarealrootof2x-log10x=7correcttofourdecimalplacesusing
NewtonRaphsonMethod
Determinethenumberoftermsrequiredintheseriesforlog(1+x)toevaluate
log1.2correcttosixdecimalplaces.
Evaluate2gtofourdecimalplacesbyNewtonsiterativemethod.
UsingNewton-Raphsonmethodfindtherootoftheequation:
x+log10x=3.375correcttofoursignificantfigures.
Findtherootoftheequation:
2x-log10x=7whichliesbetween3.5and4byRegula-Falsimethod.
Findtherootoftheequation
x
Xe =cos(x)usingtheNewtonRaphsonmethodcorrecttofourdecimalplaces.
Solvetheequations
10x12x2x3x4=3-2x1+10x2-x3x4=15-x1x2+10x3-2x4=27
-x1-x2-2x3+10x4=-9
SolvebyGauss-Jordanmethod:
10x7y+3z+5u=6-6x+8yz4u=53x+y+4z+11u=2
5x-9y-2z+4u=7
Derive the Newton-Raphson formula for the equation f(x)=0. Discuss its geometrical
interpretation.
ApplyGaussEliminationmethodtosolvetheequations:
x+4y-z=-5x+y-6z=-123x-y-z=4
-1
Finde wheree=2.71startingwithx0=0.3
Find the real root of the equation x2+4sinx = 0 correct to four places of decimal by using NewtonRaphson'smethod.
If R= 4xy2/z3 and errors in x,y,z be 0.001, show that the maximum relative error at x =y=z=1is
0.006.
SolvetheequationbyGauss-Seidelmethod:
28x+4y-z=32x+3y+10z=242x+17y+4z=35
SolvetheequationbyGauss-Eliminationmethod:
10x1-2x2-x3-x4=3-2x1+10x2-x3-x4=15-x1-x2+10x3-2x4=27
-x1-x2-2x3+10x4=-9
Definethefollowing:(a)Approximatenumber(b)Significiantfigures(c)Roundingoff

15

15

10

10

15

15

15

15

15

10

15

10

15

10

15

33

1A6

34

1B17

35

1B18

36

1B19

37

1B20

38

1B21

39

1C11

40

1C12

41

1C13

42

1C14

43

1B22

44

1B23

45

1C15

46

1C16

47

1B24

48

1C17

49

1B25

SEMESTER - 3rd SEM. MECHANICAL


SUBJECT - NUMERICAL ANALYSIS AND COMP. PROGRAMMING
Namethevarioustypesoferror.
Explaindescreteruleofsigns.
Differentiatebetweenmethodoffalseposition&bisectionmethod.
DifferentiatebetweenAlgebric&Transcedentalequation.
DifferentiatebetweenRegulaFalsi&Secantmethod.
WritethegeneralizedNewton'smethodformultipleroots.
Differentiate between Gauss Elimination & Gauss Jordan method for solving simultaneous
algebricequations.
Differentiate between Gauss Siedel & Gauss Jordan method for solving simultaneous algebric
equation.
Differentiate between Gauss Siedel & Gauss Elimination method for solving simultaneous
algebricequation.
SolvetheequationbytheGauss-Jordanmethod:
x1+2x2+x3=82x1+3x2+4x3=204x1+3x2+2x3=16
Findarealrootofthepolynomialequation:
F(x)=x534x4+x3+3.76x+10=0byusingNewton-Raphsons
method.
Findtherootoftheequationxex=cosxusingthesecantmethod,correcttofour
decimalplaces.
ApplyGauss-Jordanmethodtosolvetheequations:
x+y+z=92x3y+4z=133x+4y+5z=40
Applygauss-Seideliterationmethodtosolvetheequations:
20x+y-2z=173x+20yz=-182x3y+20=25
UseNewton-Raphsonmethodtosolvetheequations:
2
2
2
2
x=x +y
y=x y
SolvethefollowingsystemofequationsbyGauss-Seidaliteration
method:
27x+6y-z=856x+15y+2z=72x+y+54z=110
Solvetheequation:
3xcosx1=0byNewton-Raphsonmethod.

UNIT 2
SN. CAT QUESTIONS
1
2A1 Useleastsquaresregressiontofitastraightlinetothefollowingdata:

10

10

10

10

15

15

15

15

15

15

15

15

LEVEL TYPE MARKS


M
N
7

TIME
15

2B1

2B2

2B3

2A2

2B4

2B5

2B6

SEMESTER - 3rd SEM. MECHANICAL


SUBJECT - NUMERICAL ANALYSIS AND COMP. PROGRAMMING
x-1357101213161820
y-456587691211
Plotthedataandtheregressionline.
Thefollowingtablegivesthedistanceinnauticalmilesofthevisiblehorizonforthegivenheights
infeetabovetheearthssurface.Findthevaluesofywhenx=218ft.
x(height):100150200250300350400
y(distance):10.6313.0315.0416.8118.4219.9012.27
UseNewtonforwardinterpolationmethod.
A rod is rotating in a plane. The following table gives the angle q (radians) through which the rod
hasturnedforvariousvaluesofthetimetinsecond.
t:00.20.40.60.81.01.2
q:00.120.491.122.023.24.57
Calculatetheangularvelocityandtheangularaccelerationoftherodwhent=0.6second.
Thetablebelowgivesthevaluesoftanxfor0.10x0.30:
x
0.1
0.15
0.2
0.25
0.3
y=tanx 0.1003 0.1511 0.2027 0.2553 0.3093
Find:(i)tan0.12(ii)tan0.26
Thetemperatureqofavesselofcoolingwaterandthetimetinminutes
sincethebeginingofobservationareconnectedbythelawoftheform8
bt
q=ae +c.Thecorrespondingvaluesofqandtaregivenby:-
t:
0
1
2
3
5
7
10
15
52.2
48.8
46
43.5
39.7
36.5
33
29
q:
Findthebestvaluesofa,b,cbythemethodofgroupaverages.
UsingNewtonsDivideddifferenceformula,findthevaluesoff(2),f(8)
andf(15),giventhefollowingtable:
x:
4
5
7
10
11
13
f(x)
48
100
294
900
1210
2028
Thetablegivesthedistanceinnauticalmilesofthevisiblehorizonforthe
givenheightsinfeetabovetheearthssurface
X=height 100
150
200
250
300
350
400
Y=distan 10.63
13.03
15.04
16.81
18.42
19.9
21.27
ce
Findthevaluesofywhenx=218ft,and410ft.
Findthevaluesofywhen:(i)x=218ft(ii)x=410ft
From the following table of half-yearly premium for policies maturing at different ages, extimate
thepremiumforpoliciesmaturingatage46and63:

15

15

15

15

15

15

15

20
26

SEMESTER - 3rd SEM. MECHANICAL


SUBJECT - NUMERICAL ANALYSIS AND COMP. PROGRAMMING

2A3

10

2A4

11

2A5

12

2A6

13

2B7

14

2B8

15

2B9

16

2B10

17

2B11

18

2B12

19

2B13

20
21

2B14
2A7

22

2B15

23

2A8

24

2A9

25

2B16

Agex
45
50
55
60
65
Premiu
114.84
96.16
83.32
74.48
68.48
m y
Whatistheobjectiveofcurvefitting.
Namethevariousmethodsofcurvefitting.
Reduce the following equation as linear equation :- (a) y=mxn + c (b) y=axn ( c) y=axn+blogx (d)
bx
y=ae (e)xy=ax+by
Differentiatebetweenmethodof"GroupAverage"andlesssquareforcurvefitting.
Differentiatebetweenforward,backward&centraldifferencetable.
Whatisshiftoperator.
WhatisAvg.operator.
Establish the relationship between the operator :- (a) D = E -1 (b) =1-E-1 c) = E1/2 (d)=1/2(E1/2+E-1/2)
WritethegeneralformulaforNewton'sforwardinterpolation.
WritethegeneralformulaforNewton'sbackwardinterpolation.
Whatarethecriteriafortherightchoiceofinterpolationformula.
EnlisttheuseofInterpolationmethods
Determinef(x)asapolynomialinxforthefollowingdata:
-4
-1
0
2
5
x
1245
33
5
9
1335
f(x)
Fromtheaheadtable,estimatethenumberofstudentwhoobtained
Marksbetween40and45:
Marks
30-40
40-50
50-60
60-70 70-80
No.ofStudents
31
42
51
35
31
Bythemethodofleastsquares,findthestraightlinethatbestfitsthefollowing
data:
x
1
2
3
4
5
y
14
27
40
55
68
Usingmethodofleastsquares,fitarelationoftheformy=abxtothefollowingdata
x
2
3
4
5
6
y
144
172.8
207.4
248
298.5
UsingNewtonsforwardformula,findthevalueoff(1.6),if:
x
1
1.4
1.8
2.2
y
3.49
4.82
5.96
6.5

10

10

10

15

E
M

T
N

5
7

10
15

15

15

15

15

-1/2

26

2B17

27

2B18

28

2B19

29

2A10

SEMESTER - 3rd SEM. MECHANICAL


SUBJECT - NUMERICAL ANALYSIS AND COMP. PROGRAMMING
Thefollowingtablegivesthepopulationofatownduringthelastsix
censuses.Estimateusinginterpolationformula,theincreasein
populationduringtheperiodfrom1946to1948.
Year
1911
1921
1931
1941
1951
1961
Populationin(thousands)
12
15
20
27
39
52
Thefollowingtablegivesthesalesofaconcernforthelastfiveyears.Estimatethesalesforthe
Years
1946
1948
1950
1952
1954
Salesin(1000
40
43
48
52
57
Givenf(0)=-18,f(1)=0,f(3)=0,f(5)=-248,f(6)=0,f(9)=13104,findf(x).
Findthederivativef(x)atx=1.4fromthefollowingtable:
x
0.1
0.2
0.3
0.4
y=f(x) 1.10517 1.22140 1.34986 1.49182

UNIT 3
SN. CAT QUESTIONS
rd
1
3A1 DerivetheexpressionforSimpsons1/3 rule

15

15

10

15

LEVEL TYPE MARKS


M
N
7

TIME
15

giventhat
x:4.04.24.44.64.85.05.2
logx:1.38631.43511.48161.52611.56861.60941.6487

Solvethedifferentialequationdy/dx=-xy withinitial,conditiony=2atx=0,bymodified
3C1 Eulersmethodandobtainyatx=0.2intwosteps,correctupto4decimalplace

15

15

15

15

th

3
4
5

Using Runge-Kuttas 4 order method determine y for x=0.1,0.2 and 0.3 for the given differential
2
3B1 equationdy/dx=xy+y ,y(0)=1.
2
3B2 Givendy/dx=1+y ,wherey=0whenx=0,findy(0.2),y(0.4)andy(0.6),bytaking
h=0.2usingRunge-Kuttamethodof4thorder.
3C2 UsingmodifiedEulersmethod,findanapproximatevalueofywhenx=0.3,given
thatdy/dx=x+yandy=1whenx=0.

8
9

3A2

SEMESTER - 3rd SEM. MECHANICAL


SUBJECT - NUMERICAL ANALYSIS AND COMP. PROGRAMMING
2
Evaluatedx/1+x byusing(Thevalueofxrangesfrom0to6)

(i)Trapezoidalrule(ii)Simpson's1/3rule
(iii)Simpson's3/8ruleandcomparetheresultwithitsactualvalue
3C3 UsingModifiedEuler'smethod,obtainasolutionoftheequation
dy/dx=x+|y|withinitialconditionsy=1atx=0fortherange0x0.6instepsof0.2.
Apply Runge-Kutta method of 4th order to find an approximate value of y for x=0.2 in steps of 0.1
2
3B3 ifdy/dx=x+y ,giventhaty=1atx=0
Using Runge-Kutta method of fourth order, solve : dy/dx = y -x /y + x ; with y(0) =1at x=0.2,
3B4

0.4.

11

Using modified Euler's method,find an approximate value of y when x=0.3, given that dy/dx=x+y
3C4 andy=1whenx=0.
Find y(0.8) correct to 4 decimal places if y'=y-x2, y(0.6) = 1.7379 by using Runge-Kutta method
3B5 offourthorder.

12

3B6

10

13

Givendy/dx=y-x/y+xwithinitialconditiony=1atx=0;findyforx=0.1byEuler'smethod.
Solve the following by Euler modified method : dy/dx=log(x+y),y(0)=2 at x=1.2 and 1.4 with
3B7 h=0.2.

14

3B8

15

3A3

16

3A4

17

3A5

18

3A6

19

3A7

20

3B9

21

3B10

22

3B11

23

3A8

24

3A9

UsingRunge-kuttamethodforfourthorder,solve:dy/dx=y -x /y +x withy(0)=1atx=0.2,0.4.
WritethegeneralformulaforNumericalintegration.
DeveloptheNumericalintegrationformulaforTrapezoidalrule.
DeveloptheNumericalintegrationformulaforSimpson's1/3rule.
DeveloptheNumericalintegrationformulafor3/8rule.
DifferentiateSimpson's1/3&3/8rule.
DifferentiatebetweenEuler's&modifiedEuler'smethod.
WritethegeneralformulaforsolvingordinarydifferentialequationusingRungemethod..
WritethegeneralformulaforsolvingordinarydifferentialequationusingRunge-Kuttamethod..
CalculatethevalueofsinxdxbySimpsons1/3ruleusing11-ordinates
xrangesfrom0-180degree
ThevelocityV(km/min)ofamopedwhichstartsfromrest,isgivenatfixed
Intervaloftimet(min)asfollows:
t
2
4
6
8
10
12
14
16
18
V
10
18
25
29
32
20
11
5
2

15

15

15

15

15

15

15

15

15

10

10

10

15

15

last value of t and v is 20 and 0 respectively

Estimateapproximatelydistancecoveredin20minutes.
25 3A10 Evaluatedx/1+xtaking7ordinatesbyapplyingSimpsons3/8rule.Deduce
2
thevalueofloge .Where'x'rangesfrom0-1.

26

3B12

27

3C5

28

3A11

29

3A12

30

3B13

31

3B14

32

3A13

33

3B15

SEMESTER - 3rd SEM. MECHANICAL


SUBJECT - NUMERICAL ANALYSIS AND COMP. PROGRAMMING
UsingEulersmethod,findapproximatevalueofywhenx=0.6,
dy/dx=1-2xy,giventhaty=0whenx=0(takeh=0.2).
ApplyMilnesmethodtofindasolutionofthedifferentialequation
y=x-y2intherange0x1fortheboundaryconditiony=0atx=0.
ThevelocityvofaparticleatdistanceSfromapointonitspathisgivenby
thetable:
S,ft
0
10
20
30
40
50
v,ft/sec.
47
58
64
65
61
52
Estimatethetimetakentotravel60ftbyusingSimpsons1/3rule.
2
Evaluatedx/1+x byusingSimpsons3/8rule.Henceobtainthe
approximatevalueofp.wherexrangesfrom0to1
UsingEulersmodifiedmethod,findasolutionoftheequation
dy/dx=x+|y|=f(x,y)
withinitialconditiony=1atx=0fortherange0x-6instepsof2.
UseRunge-KuttamethodtoapproximateY,whenx=0.1andx=0.2.
Giventhatx=0,wheny=1anddy/dx=x+y.
2

2
3
Findthevalueoflog3fromx /1+x dx(thevalueofxrangesfrom0to1)usingSimpson's1/3
2

UseRunge'smethodtoapproximateywhenx=1.1giveny=1.2atx=1anddy/dx=3x+y

UNIT 4
SN. CAT QUESTIONS
1
4A1 Derivethe5pointstandardfinitedifferenceschemeforlaplaceequation

15

15

15

15

15

15

15

15

LEVEL TYPE MARKS


E
T
2

TIME
5

u=0
ui,j=[ui+1,j+ui-1,j+ui,j+1+ui,j-1]
2
4B1 SolvethePoissonsequation u=8x2y2forthesquaremeshgivenbelowwithu(x,y)=0
u7
u4
u1
u8
u5
u2

u9
u6
u3

4C1

Solvetheleastequationu/t= u/x ,subjecttothecondition


u(0,t)=u(1,t)=0and
U(x.0)=2xfor0x

15

15

4B2

4B3

4C2

10

4F1

11

4C3

12

4B4

13

4E1

14

4F2

SEMESTER - 3rd SEM. MECHANICAL


SUBJECT - NUMERICAL ANALYSIS AND COMP. PROGRAMMING
=2(1-x)for1/2x1
Solvetheequation:2u=-10(x2+y2+10)overthesquarewithsides
x=0=y,x=3=ywithu=0ontheboundaryandmeshlength=1.
Evaluatethepivotalvaluesoftheequationuu=16uxxtakingDx=1upto
t=1.25.Theboundaryconditionsareu(0,t)=u(5,t)=0.ut(x,0)=0and
2
u(x,0)=x (5-x).
Solvetheparabolicequation:
k2u/x2=u/t,r<x<t,t>0withboundarycondition:
ux(0,t)=0U(L,t)=aandinitialcondition:u(x,0)=u0
2
Applyrelaxationmethodtosolvetheequation u=-400,whentheregion
ofuisthesquareboundedbyx=0,y=0,x=4andy=4anduis0onthe
boundaryofthesquare.
Findthesolutionoftheparabolicequationuxx=2u,whenu(0,t)=u(4,t)=0
andu(x,0)=x(4-x),takingh=1.Findthevaluesuptot=5.
2
2
2
Solvetheequation u=-10(x +y +10)overthesquarewithsidesx=0=y,
x=3=ywithu=0ontheboundaryandmeshlength=1.
Findthesolutionofthedifferentialequationd2y/dx2+x2y=0with
theboundaryconditiony(0)=0,y(1)=1atthepoint0.25,0.50and0.75
byapproximatingthedifferentialequationwithasecondorder
differenceequation.
SolvebyRelaxationmethod.TheinitialvaluesofUatA,B,CandDareestimatedtobe
1000,625,875and375
1000
1000
1000
1000
1000
2000
500
A
B
2000
0
C
D

15

15

15

15

15

15

15

15

15

15

15

1000

15

500
0
0
2
2
Find the values of u(x,t) satisfying the parabolic equation u/t = 4 u/x and the boundary
conditions u(0,t)=0=4(8,t) and u(x,0)=4x-1/2x2 at the points x=i : 1,2,.7 and t=1/8 j : j =
4C4 0,1,..5
Evaluate the pivotal values of the equation uu=16Uxx, taking Dx=1 upto t=1.25. The boundary

16

17

conditionsareu(0,t)=u(5,t)=0,ut(x,0)=0andu(x,0)=x2(5-x)
4C6 Solvetheparabolicequation:
4C5

18
19
20
21
22
23
24
25
26
27
28

4B5
4B6
4A2
4A3
4B7
4B8
4C7
4E2
4E3
4A4
4D1

SEMESTER - 3rd SEM. MECHANICAL


SUBJECT - NUMERICAL ANALYSIS AND COMP. PROGRAMMING
k2u/x2=u/t0<x<t,t>0withboundaryconditionUx(0,t)=0U(l,t)=9
andinitialconditionu(x,0)=40.
WritethegeneralformofEllipticalequation.
WritethegeneralformofLeplaceequation.
Whatisstandard5pointformula.
WhatisDiagonal5pointformula.
DifferentiatebetweenJacobi's&GaussSiedelmethodforsolvingpartialdifferentialequation
WritethegeneralformofPoisson'sequation.
WritethegeneralformofParabolicequation.
Writethegeneralformofonedimensionalheatequation.
WritethegeneralformofTwodimensionalheatequation.
WritethegeneralformofHyperbolicequation.
WritethegeneralformofWaveequation.

UNIT 5
SN. CAT QUESTIONS
1
5A1 Statewhatiswronginthestatement
2

5A2

5A3

5A4

5A5

Printf(%f,%d,%S,price,count,city);
Statewhatiswronginthestatement:
Printf(%-S,%C\n,city,code);
Showtheexactoutputofthefollowingstatement
Printf(%2d\n%f,count,price);
Showtheexactoutputofthefollowingstatement
Printf(%-10d%-15S,count,city);
Find the errors if any in following looping segments. Assume that all the variables have been
declaredandassignedvalues
(i)while(count!=10);
{count=1;
sum=sum+x;
count=count+1;
}
(ii)for(p=10;p>0;
p=p-1;
printf(%f,p);

5A6

Findtheerrorsifanyinthefollowingprogramstatements:
(i)for(i=1,i<=5;i++)
for(j=1,j<=4,j++)

10

LEVEL TYPE MARKS


H
T
2

TIME
2

SEMESTER - 3rd SEM. MECHANICAL


SUBJECT - NUMERICAL ANALYSIS AND COMP. PROGRAMMING
A[i][j]=0;
(ii)for(i=4,i>=0;i--)
for(j=0;j<=4,j++)
A[i][j]=B[j]+1.0;
4

5D1

5A7

5B1

5B2

5B3

5C1

10
11
12

5B4
5C2
5C3

14
15

5B5
5B6

Determinewhatwillbeoutputofthefollowingprogramsegment
(i)for(i=0;string[i]=\0;i++;
printf(%d\nstring[i];
(ii)for(i=0;i<=strelen[string];;)
{string[i++]=i;
printf(%S\n,string[i];
Statewhetherthefollowingfunctionheadersarevalidorinvalidandwhyinvalid?
(i)average(x,y,z);
(ii)power(a,n-1)
(iii)product(m,10);
(iv)doubleminimum(floata;floatb;)
ExplainthevariouslogicaloperatorsusedinCprogrammingwithexample.
StatethevarioustypesoflogicalstatementsthatareusedinCprogrammingwith
theirsyntaxandexample.
Writenotesonthefollowing:
(i)Array
(ii)Breakstatement
(iii)Loops
(iv)Declarationstatement
(v)Pointers
WriteaCprogramforsolutionofordinarydifferentialequationbyEulersmethod.
Withanexampleexplaintheconditionaloperatorsavailablein'C'Language.
Writeaprogramtostore10numbersinanarrayandarrangetheminascendingorder.
Writeaprogramtogeneratethepattern
*
**
***
****
*****
DiscussaboutCconstants,CvariablesandrulesfornamingCvariables.
Discussaboutvariousshorthandassignmentoperatorsandrelationaloperatorsavailable

10

15

15

10

10

10

16

5B7

17
18
19
20

5C4
5B8
5B9

21 5B10
22

5B11

23

5B12

24

5B13

25

5C5

26

5C6

27

5C7

SEMESTER - 3rd SEM. MECHANICAL


SUBJECT - NUMERICAL ANALYSIS AND COMP. PROGRAMMING
inCwiththeirsymbols.
Writenotesonthefollowing:
(i)Functions(ii)SwitchStatement(iii)Union(iv)Structure(v)Input/outputstatement
WriteaCprogramforsolutionofordinarydifferentialequationbyRunge-KuttaMethod
WriteaCprogramforsolutionofalgebraicequationbyNewton-Raphsonmethod.
DiscussaboutCconstants,CvariablesandrulesforCvariablesnaming.
StatethevarioustypesofLogicalstatementsthatareusedinCprogrammingwiththeirsyntax
andexample.
Writenotesonthefollowing:
(i)Array(ii)DO-while(iii)Pointer(iv)Union(v)Structure
ExplainvariousC-expressionswithsuitableexample.
Differentiateone-dimensionalarraysandtwo-dimensionalarraysandexplaintheuseofarrays
tosolvingtheproblemsofThermalEngineeringwithsuitableexamples.
Explainthefollowingtermologywithsuitableprogram:(i)getchar(ii)Unions
(iii)C-stringLibrary
Writeaprogramtofindmultiplicationoftwosquarematrix.
WriteaCprogramforsolutionofsimultaneousalgebricalequationby
Gausseliminationmethod.
WriteaCprogramtofindthevaluesofu(x,t)satisfyingtheparabolicequation
2

u/t=4 u/x andtheboundaryconditionsu(0,t)=0=u(8,t)andu(x,0)=


4x-x2/2atpointsx=i;i=0,1,2,..7andt=1/8j,j=0,1,2,,5.

15

15

15

10

10

10

10

10

15

15

15