Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
12Activity
0 of .
Results for:
No results containing your search query
P. 1
r05010303-computer-programming-and-numerical-methods

r05010303-computer-programming-and-numerical-methods

Ratings: (0)|Views: 503 |Likes:
Published by SRINIVASA RAO GANTA

More info:

Published by: SRINIVASA RAO GANTA on Sep 18, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/09/2014

pdf

text

original

Code No: R05010303
Set No. 1
I B.Tech Supplimentary Examinations, Aug/Sep 2008
COMPUTER PROGRAMMING AND NUMERICAL METHODS
( Common to Mechanical Engineering, Chemical Engineering, Mechatronics,
Metallurgy & Material Technology, Production Engineering and Automobile
Engineering)
Time: 3 hours
Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
\u22c6 \u22c6 \u22c6 \u22c6 \u22c6
1. (a) Write the various steps involved in executing a C program and illustrate it
with a help of \ufb02owchart.

(b) Candidates have to score 90 or above in the IQ test to be considered eligible for taking further tests. All candidates who do not clear the IQ test are sent reject letters and others are sent call letters for further tests. Represent the logic for automating this task.

[8+8]
2. (a) What are the advantages and disadvantages of recursion.
(b) Write a C program to \ufb01nd the factors of a given integer using a function.
[6+10]
3. (a) Write a \u2018C\u2019 Program to compute the sum of all elements stored in an array
using pointers.
(b) Write a \u2018C\u2019 program using pointers to determine the length of a character
string.
[8+8]

4. (a) What is meant by self-referential structure. What are its advantages.
(b) What is the general declaration syntax of a structure.
(c) What is a union in C? How is data stored using union.

[6+4+6]
5. Use the operations push, pop, stacktop, and empty to construct operations on
stack, which do each of the following:
Given an integer n, set i to the n the element from the top of stack, leaving the
stack unchanged Set I to the bottom element of stack, leaving the stack empty.[16]
6. (a) Find a real root of x+logx-2=0 using Newton Raphson method.
(b) Find a real root ofx3-4x-9=0 using bisection method.
[8+8]
7. (a) Prove that (1+ \u2206) (1-\u2207)=1
(b) Find f(3.4) from the following table using Newton\u2019s forward formula
x3 4
5
6
y 31 69 131 223
(c) Given that f(7) = -2, f(0) = -1, f(2) = 1, f(3) = 4 \ufb01nd the polynomial for these
points using Lagranges interpolation formula
[5+6+5]
1 of 2
Code No: R05010303
Set No. 1
8. (a) Evaluate
1
\ue0000
dx
1+x, taking h=.25 using cubic splines
(b) Fit a parabola of the form y=a+bx+cx2 for the following data.
x 1.0 1.5 2.0 2.5 3.0 3.5 4.0
y 1.1 1.3 1.6 2.0 2.7 3.4 4.1
[8+8]
\u22c6 \u22c6 \u22c6 \u22c6 \u22c6
2 of 2
Code No: R05010303
Set No. 2
I B.Tech Supplimentary Examinations, Aug/Sep 2008
COMPUTER PROGRAMMING AND NUMERICAL METHODS
( Common to Mechanical Engineering, Chemical Engineering, Mechatronics,
Metallurgy & Material Technology, Production Engineering and Automobile
Engineering)
Time: 3 hours
Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
\u22c6 \u22c6 \u22c6 \u22c6 \u22c6
1. Write about space requirements for variables of di\ufb00erent data types.
[16]
2. (a) Write a program to demonstrate passing an array argument to a function.
Consider the problem of \ufb01nding largest of N numbers de\ufb01ned in an array.
(b) Write a recursive function power (base, exponent) that when invoked returns
base exponent.
[8+8]
3. The roots of a quadratic equation of the form ax2+bx+c = 0 are given by the
following equations:
X1 =\u2212b+
\ue001(b2\u2212 4ac)/2a
X2 =\u2212b\u2212
\ue001
(b2\u2212 4ac)/2a

Write a function to calculate the roots. The function must use two pointer para- meters, one to receive the coe\ufb03cients a,b and c and the other to send the roots to the calling function.

[16]
4. (a) What is the use of struct keyword? Explain the use of dot operator? Give an
example for each.

(b) Write a C program to accept records of the di\ufb00erent states using array of structures. The structure should contain char state, population, literary rate, and income. Display the state whose literary rate is highest and whose income is highest.

[6+10]
5. Write a C program to evaluate the post\ufb01x expression.
[16]
6. (a) Find a real root of the equation x-cosx=0 by bisection method.
(b) Evaluate
\u221a
12 to four decimal places by Newton\u2019s Raphson method.
[8+8]
7. (a) Use Newton\u2019s forward di\ufb00erence formula to \ufb01nd f(22) and f(42) from the fol-
loawing table
x 20 25 30 35 40 45
y 354 332 291 260 231 204
(b) Find y(35) using Lagranges intepolation formula
x 25 30
40
50
y 52 67.3 84.1 94.4
[8+8]
1 of 2

Activity (12)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Hoseong Jeon liked this
Alvin Maigue liked this
kengalt liked this
Shubham Mishra liked this
bikashsaku liked this
Pooja Meshram liked this
warezisgr8 liked this
Hari Baboo liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->