MORE IN Structured Programming Approach
MU First Year Engineering (Semester 2)
Structured Programming Approach
December 2011
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary

1 (a) What are the features of Object Oriented Programming?
10 M
1 (b) Find the output of the following:-
(i) int c[] = {2, 8, 3, 4, 4, 6, 7, 5};
int j, *p = c, *q = c;
for(j = 0; j <<5; j++) cout<<*c;
for(j = 0; j << 5; j++) cout<<*p++;
(ii) int i = 1; j = -1; int k = 0, l = 2, m;
m = i++ && j++ && k++ || l++;
printf("%d%d%d%d%d", i, j, k, l, m);
(iii) int c = 2;
printf("c = ", c);
10 M

2 (a) Write a program to print the following pattern:-
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 2 1
1 2 1
1
10 M
2 (b)(i) Explain Call by value and call by reference with the help of an example.
5 M
2 (b)(ii) Write a program to print prime numbers from 1 to 200.
5 M

3 (a) Write a program to sort an array in ascending order.
10 M
10 M

4 (a) What is recursion? Write a recursive program to reverse a number.
10 M
4 (b) Write a program to implement multileveled inheritance.
10 M

5 (a) Declare a structure product that will describe the name, weight and price of the product. Develop a program that will store information of 25 products using structure. Also display names in descending order of price.
10 M
5 (b) Differentiate between Constructor & Destructor, Function Overloading & Overriding, and Break & Continue.
10 M

6 (a) Write a program to perform Matrix Multiplication.
10 M
6 (b) Write a program to perform string copy with the help of pointers.
10 M

Write short notes on any four:-
7 (a) Friend function
5 M
7 (b) Virtual Base Class
5 M
7 (c) Static Data Member and function
5 M
7 (d) Access Specifiers
5 M
7 (e) Virtual Functions
5 M

More question papers from Structured Programming Approach