Sie sind auf Seite 1von 7

www.andhracolleges.

com The Complete Information About Colleges in Andhra Pradesh

Code No: R05010303 Set No. 1


I B.Tech Supplimentary Examinations, February 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

www.andhracolleges.com
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) Draw a Flowchart for the following


The average score for 3 tests has to be greater than 80 for a candidate to
qualify for the interview. Representing the conditional logic for generating
reject letters for all candidates who do not get the required average & interview
call letters for the others.
(b) Explain the basic structure of C program. [10+6]
2. (a) What is macro. What are the differences between macros and functions.
(b) Give a brief note about.
i. Error directive
ii. Pragma directive. [8+8]
3. (a) What is a pointer variable? How is a pointer variable different from an ordi-
nary variable.
(b) Write a C program to read in an array of integers. Instead of using subscript-
ing, however, employ an integer pointer that points to the elements currently

www.andhracolleges.com
being read in, and which is incremented each time. [8+8]
4. (a) List out the similarities and differences between structures and Unions.
(b) What is the general format of a union? Declare a union and assign values to
it. Explain the process of accessing the union members. [8+8]
5. Write a C program to demonstrate the operations performed on stacks. [16]
6. (a) Find a real root of the equation x3 -4x-1=0 by bisection method.
(b) Find a root of the equation ex =1+2x using Newton Raphson method. [8+8]
7. (a) Show that ∆2 fi = (fi + fi+1 ) ∆ fi
(b) Find y(2.5) using Newton’s interpolation formula

x 0 1 2 3 4
y 7 10 13 22 43
(c) Express f(x) =x2 + x + 1 into factorial polynomial [5+6+5]
dy
8. If dx = 2ex y, y(0) = 2 find y(.4) using Adam’s predictor corrector formula by
calculating y(.1), y(.2) and y(.3) using Taylor’s Series method. [16]
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
1 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: R05010303 Set No. 1


⋆⋆⋆⋆⋆

www.andhracolleges.com

www.andhracolleges.com
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
2 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: R05010303 Set No. 2


I B.Tech Supplimentary Examinations, February 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

www.andhracolleges.com
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) What is the difference between short integer and long integer in terms of
memory, range, control string and variable declaration.
(b) Distinguish between float and double in terms of storage and range. [8+8]

2. (a) What is macro. What are the differences between macros and functions.
(b) Give a brief note about.
i. Error directive
ii. Pragma directive. [8+8]

3. (a) What is a pointer? List out the reasons for using pointers.
(b) Write a C Program to illustrate the use of indirection operator “ * ” to access
the value pointed by a pointer. [8+8]

4. Write a C program to add the two given complex numbers. Define functions add
and print with pointers as arguments. The complex number is a structure object

www.andhracolleges.com
with real and image fields. [16]

5. Write a non-recursive simulation of Towers of Hanoi problem. [16]

6. (a) Find a real root of x4 -x-10=0 using bisection method.


(b) Find a real root of the equation xex -cosx-0 by iteration method. [8+8]

7. (a) Given that y0 =1, y1 =0, y2 =5,y3 =2,y4 =57, find y 21 using Newton’s forward
formula
(b) Given that by 654=2.8156, log10 658=2.8182, log10 659=2.8189, log10 661=2.8202,
find log10 656 [8+8]
5.2
R
8. (a) Evaluate log xdx taking h=.2 using weddle’s rule
4
R2 2
(b) Evaluate e−x dx using Simpson?s rule.Taking h = 0.25. [8+8]
0

⋆⋆⋆⋆⋆

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


1 ofUSA-UK-Australia-Germany-France-NewZealand
1 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: R05010303 Set No. 3


I B.Tech Supplimentary Examinations, February 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

www.andhracolleges.com
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. Write about space requirements for variables of different data types. [16]

2. (a) Write a program to demonstrate passing an array argument to a function.


Consider the problem of finding largest of N numbers defined in an array.
(b) Write a recursive function power (base, exponent) that when invoked returns
base exponent. [8+8]

3. (a) Explain the process of declaring and initializing pointers. Give an example.
(b) Write a C program that uses a pointer as a function argument. [8+8]

4. (a) Explain the different ways of passing structure as arguments in functions.


(b) Write a C program to illustrate the method of sending an entire structure as
a parameter to a function. [8+8]

5. Use the operations push, pop, stacktop, and empty to construct operations on
stack, which do each of the following:

www.andhracolleges.com
(a) Given an integer n, set i to the nth element from the top of stack, leaving the
stack without its top n elements.
(b) Set i to the bottom element of stack, leaving the stack unchanged [8+8]

6. (a) Find a real root of x4 -x-10=0 using bisection method.


(b) Find a real root of the equation xex -cosx-0 by iteration method. [8+8]

7. (a) Find y(1.85) using Newton’s interpolation formula

x 1.7 1.8 1.9 2.0 2.1 2.2


y 5.474 6.05 6.686 7.389 8.166 9.025
(b) Find y(30) using Gauss forward interpolation formula given that y(21)=18.4708,
y(25)=17.8144, y(29)=17.107, y(33)=16.3432, y(37)=15.5154. [8+8]

8. (a) Find the first and 2nd derivatives at x=1.5

x 1.5 2.0 2.5 3.0 3.5 4.0


y 3.375 7.0 13.625 24.0 38.875 59.0

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


1 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: R05010303 Set No. 3


R10 dx
(b) Evaluate 1+x
by dividing the range in to 8 equal parts using
2

i. Trapezoidal rule
ii. Simpson’s 13 rule. [8+8]

www.andhracolleges.com
⋆⋆⋆⋆⋆

www.andhracolleges.com
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
2 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: R05010303 Set No. 4


I B.Tech Supplimentary Examinations, February 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

www.andhracolleges.com
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) What is the purpose of break statement?


(b) Suppose a break statement is included within the innermost of several nested
control statements. What happens when break statement is executed?
(c) Write a program to print the multiplication table upto to with proper format.
[4+6+6]
2. (a) How are initial values written in a one-dimensional array definition? Is the
entire array be initialized? What value is automatically assigned to those
array elements not explicitly initialized?
(b) Write a program to calculate mean, variance and standard deviation of n
numbers.

S= variance, where
Variance = 1/n sum (xi − m)2
M= mean of n numbers. [8+8]
3. (a) Write a ‘C’ program to find factorial of a given number using pointers.

www.andhracolleges.com
(b) Write a ‘C’ program to arrange the given names in alphabetical order using
pointers. [8+8]
4. (a) Describe nested structures. Draw diagrams to explain nested structure.
(b) Write a program to declare pointer as members of structure and display the
contents of the structure. Define a structure object, boy with three fields:
name, age and height. [6+10]
5. (a) Define stack write a C program that reverses a string using stack.
(b) Write a recursive function that returns the factorial of a given number. [8+8]
6. (a) Find a real root of the equation x4 -x-10=0 by bisection method.

(b) Find 3 17 using Newton Raphson method. [8+8]
7. (a) Derive the formula to estimate the polynomial of degree n using Lagrange’s
interpolation method.
(b) Find f(1.6) using Lagrauges formula from the following data.

x 1.2 2.0 2.5 3.0


[6+10]
f(x) 1.36 .58 .34 .20
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
1 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: R05010303 Set No. 4


dy
8. Use Runga kutta method to solve 10 dx
= x2 + y 2 , y(0) = 1 for the interval 0 <
x ≤ .4 with h=.1 [16]

⋆⋆⋆⋆⋆

www.andhracolleges.com

www.andhracolleges.com
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
2 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information