Set No.

Codes No.10106 I-B.Tech. Supplementary-Examination December 2002/January 2003 INTRODUCTION TO COMPUTERS (Common to Civil Engineering, Mechanical Engineering, Printing Technology, Metallurgical Engineering, Production Engineering, Chemical Engineering, Mechatronics, Metallurgy and Material Technology, Mechanical and Manufacturing Engineering) Time:3 hours Max.Marks:80 Answer any Five questions All questions carry equal Marks --Draw the functional block diagram of computer system and explain the functions of each unit in brief. What is an operating system? Describe the services provided by the operating system. Draw a flowchart to find out the value of cos x using the following series. x2 x4 x6 Cos x = 1- ---- + ---- - ---- + …… up to infinity. 2! 4! 6! Explain the Bitwise operators with examples. What is the output of following program segment. # include<stdio.h> main( ) { int a,b,c,d; a=15;b=10; c=++a-b; printf(“a=%d b=%d c=%d\n”, a,b,c); d=b++ +a; printf(“a=%d b=%d d=%\n”, a,b,d); printf(“a/b=%d\n”, a/b); printf(“a%%b=%d\n”,a%b); printf(“a*b=%d\n”,a*=b); printf(“%d\n”,(c>d)?1:0); } What value evaluates the following expression. int i; float f; long int l; l/i+ i*f; (contd…2)

1

1.a) b) 2.a)

b) 3.a)

b)

Code No.10106 c) 4.a) b) 5.a) b) 6.a)

-2-

Set No.1

Write a ‘C’ program to find out the sum of the digits of the given number. (Note:-if number is 456 then sum is 15). Write a program to find out whether the given number is part of the Fibonacci series or not by using separate function. (Note:- Fibonacci series is 1 1 2 3 5 8…) Write a ‘C’ program to reverse the given string using pointers. (Note:- write a separate function and don’t use string handling functions). Find the root of the equation x3 – x – 4 = 0 using False position method. Write an algorithm to implement Newton-Raphson method. Given the following table of values x 0.4 0.5 0.7 0.8 f(x) -0.91 -0.693 -0.357 -0.223 Estimate the value of f(0.6) using Langrange interpolation. What order polynomial would you use in the above example. Write an algorithm to implement Linear Regression.
1

b) 7.a) b) 8.a) b)

Evaluate ∫ 1 0 1+x2
1

dx with h=0.125 using Trapezoidal rule. dx with h=1 using Simpsons 3 rule. 6 8

Evaluate
0

∫ 1 1+x2

Why Runge-Kutta method is preferable over the other methods for solving ordinary differential equations? Use Runge-Kutta 4th order method to solve the following differential equation. dy --- = x2y2 –xy with y = 1 at x=0 and h=0.1 dx in the range 0≤x≤1. *** *** ***

Set No.
Codes No.10106 I-B.Tech. Supplementary-Examination December 2002/January 2003 INTRODUCTION TO COMPUTERS (Common to Civil Engineering, Mechanical Engineering, Printing Technology, Metallurgical Engineering, Production Engineering, Chemical Engineering, Mechatronics, Metallurgy and Material Technology, Mechanical and Manufacturing Engineering) Time:3 hours Answer any Five questions All questions carry equal Marks --1.a) b) c) 2.a) b) c) 3.a) b) 4.a) b) Explain about functional block diagram of a computer. Distinguish between RAM & ROM Explain various functions of an operating system. Explain various data types in C with examples Given an integer number consisting of 5-digits, reduce it to a single digit number. For example, given 1234 > 10>1. Develop a program to do this. Try to develop a strategy to swap contents of Two integer variables without using a third variable. Given a series of floating-point numbers, write a program to arrange them in descending order. Distinguish between struct and union constructs in C using suitable examples. Write an algorithm for Newton-Raphson method. Also derive the formula used. Solve the following equations using the Gauss Siedel method. 3x1+6x2+x3 = 16 2x1+4x2+3x3 = 13 x1+3x2+2x3 = 9 Write an algorithm for Lagrange’s interpolation. Also obtain the trace of the algorithm with suitable numerical example. Fit a straight line to the following set of data X Y 1 3 2 4 3 5 4 6 5 8 (contd…2) Max.Marks:80

2

5.a) b)

Code No.10106
1

-21 . 4

Set No.2

6.a) b) 7.a)

Solve ∫ exdx using Simpson’s 3/8th rule with h=
-1

Write an algorithm for numerical integration by Trapezoidal rule. Also derive the formula used. Given the equation dy = 3x2+1 with y(1)=2 dx Estimate y(2) by Euler’s method using h=0.25. Also derive the formula used. Explain the Milne-Predictor-Corrector method with suitable example. Write short notes on the following: a) LASER printer b) FOR statement in ‘C’ c) File management in ‘C’ d) Errors in interpolation. *** *** ***

b) 8.

Set No.
Codes No.10106 I-B.Tech. Supplementary-Examination December 2002/January 2003

3

INTRODUCTION TO COMPUTERS (Common to Civil Engineering, Mechanical Engineering, Printing Technology, Metallurgical Engineering, Production Engineering, Chemical Engineering, Mechatronics, Metallurgy and Material Technology, Mechanical and Manufacturing Engineering) Time:3 hours Answer any Five questions All questions carry equal Marks --1.a) b) c) 2.a) b) 3.a) b) 4.a) b) 5.a) b) Explain with an example the different ways of representing negative numbers. Perform the arithmetic operations (+42)+(-13) and (-42)-(-13) in binary using signed -2'5 complement representation for negative numbers. Draw the block diagram of a digital computer. Obtain a flow chart to find both the largest and smallest integers in a given array of integers. Write a C program to find out whether a given integer is odd or even using bitwise operators. Write a program in C to insert a substring into a mainstring from a given position. Write a program in C using pointers to compute the sum of all integers stored in an array. Discuss briefly the following storage classes in C: i) Static (ii) Register Write a program in C to copy the contents of one text file into another. compare the Runge-Kutta and Predictor-Corrector methods used for solving differential equations. Solve the differential equation dy = 1 for x=0.5(0.5)2 by using dx x+y Runge-Kutta’s method. Initial value: x=0,y=1. Deduce Lagrange’s formula for interpolation for unequal intervals.
6

Max.Marks:80

6.a) b)

Evaluate ∫ dx by using 0 2 1+x i) Simpson’s 1/3 rule

ii) Simpson’s 3/8 rule. (contd…2)

Code No.10106 7.a)

-2-

Set No.3

b) 8.

Solve the following equations by Gauss-Seidel iteration method: 10x1+2x2+x3 = 9 2x1+20x2-2x3 = -44 -2x1+3x2+10x3 = 22 Find the real root of the equation x4-x-10 = 0 correct to three decimal places by Newton-Raphson method. Write notes on any Three of the following: a) Polynomial regression algorithm b) Difference between structure and union in C c) Errors in interpolation d) Cache memory. *** *** ***

Set No.
Codes No.10106 I-B.Tech. Supplementary-Examination December 2002/January 2003 INTRODUCTION TO COMPUTERS (Common to Civil Engineering, Mechanical Engineering, Printing Technology, Metallurgical Engineering, Production Engineering, Chemical Engineering, Mechatronics, Metallurgy and Material Technology, Mechanical and Manufacturing Engineering) Time:3 hours Answer any Five questions All questions carry equal Marks --1.a) b) Discuss Euler’s method and its modifications for the solution of a differential equation. Given dy =xy2+1, y(0)=1 dx Determine y(0.02),y(0.04),y(0.06) using Euler’s modified method. Solve the following set of equations by Gauss-Jordan method 2x1+2x2+4x3 = 18 x1+3x2+2x3 = 13 3x1+x2+3x3 = 14 Explain the method of false position, and give its algorithm. Given the following table of values X f(x) 0.4 -0.916 0.5 -0.693 0.7 -0.357 0.8 -0.223 Max.Marks:80

4

2.a)

b) 3.a)

b) 4.a) b)

Estimate the value of f(0.6) using Lagrange interpolation. What order of polynomial would you use in the above example. Discuss the conceptual difference between obtaining an interpolating polynomial for a set of data and the least square polynomial. Explain the numerical integration by trapezidel method and give the algorithm. Evaluate the following integral using Simpsons rule with 10 points.
5

S1 = ∫ e-x² dx
0

(contd…2)

Code No.10106 5.a) b)

-2-

Set No.4

Explain the functions of the various blocks of a computer with a neat block diagram. Describe about the following: i) CPU (ii) Example of input-output devices iii) Commonly used secondary devices. Distinguish between: i) Data bus and control bus ii) Control bus and Data bus iii) RAM and ROM. Carryout the conversions as desired i) (1110001.11)2 = ( )10 ii) (1764)10 = ( )8 iii) (2B4)16 = ( )10 Why is C called a middle level language? Write C functions to add, subtract, multiply two complex numbers. (for example if C is a complex number, C can be written as C = a+ib) How are C structures different from unions? Write a C-program to check whether a given string is a palindrome or not. If the string is not a palindrome, print it backwards. (for example MALAYALAM is a palindrome), i.e the string which reads same in both ways). *** *** ***

6.a)

b)

7.a) b) 8.a) b)