Semester : SEMESTER 5
Subject : Computer Programming & Numerical Methods
Year : 2019
Term : MAY
Branch : MECHANICAL ENGINEERING
Scheme : 2015 Full Time
Course Code : ME 305
Page:1
0 E1161 Pages: 2
Reg No.: Name:
APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY
FIFTH SEMESTER B.TECH DEGREE EXAMINATION(S), MAY 2019
Course Code: ME305
Course Name: COMPUTER PROGRAMMING & NUMERICAL METHODS
Max. Marks: 100 Duration: 3 Hours
PARTA
Answer any three full questions, each carries 10marks. Marks
1 Explain with the help of an example program how data can be inputted by 6+2+
reading from a file. Add statements in the program to display the numbers read. 2
Also show the contents of the data file to be prepared.
2 a) How many bits are used to store a float type C++ data in the computer memory? 241
What is the number of significant digits in a float type data?
b) Explain how a float type data is stored in the computer memory. 7
3 a) What are control statements? Write any four control statements used in C++ 6
b) Write and explain the syntax of “for” loop. 4
4 Write a C++ program using do..while statement to print the sum of squares of 8--2
an array containing “10” values to be declared and initialized. Show how the
output of the program is displayed.
PART छ
Answer any three full questions, each carries 10marks.
5 98) List any three advantages of pointers. What is pointer to a one-dimensional 3+3
array?
b) Differentiate between function call by value and function call by reference. 4
6 Write a C++ program to declare and initialize two matrices. Add statements in 3+7
this program to find their product.
7 2) Whatare friend functions? 4
b) Show using an example code, how a friend function access private members of
a class.
8 Explain public inheritance and private inheritance with suitable examples 10
PART C
Answer any four full questions, each carries 10marks.
9 Solve the following system of equations using an iterative solution technique 9+1
8. - 3) + 22 = 20, 4x+1ly—z=33 and 6x+3y+12z=36. Name the method
used
Page 1 of 2