1 (a)(i)
Explain inline function?
2 M
1 (a)(ii)
Explain why break and continue statements are used in program.
2 M
1 (a)(iii)
Explain the basic difference between a structure and a union with an example.
2 M
1 (a)(iv)
What is a constructor? Explain in brief.
2 M
1 (a)(v)
What will be the output of the following program code:-
#include
void main(){
for(int i = 0; i < 10; i++)
cout << Hello World << endl;
cout << i = << i ;
}
#include
void main(){
for(int i = 0; i < 10; i++)
cout << Hello World << endl;
cout << i = << i ;
}
2 M
1 (b)
What is OOP? Explain its features.
5 M
1 (c)
Explain data types in C with respect to their keyword, memory requirement and range.
5 M
2 (a)
Write a program to print the Pascal triangle.
1
11
121
1331
14641
1
11
121
1331
14641
10 M
2 (b)
Explain storage classes with suitable example.
10 M
3 (a)
Explain bitwise operators.
5 M
3 (b)
Write a recursive program to calculate the factorial of a given number.
5 M
3 (c)
Write a program to read two matrices and perform multiplication on them. Display the resultant matrix.
5 M
3 (d)
Differentiate between while and do-while.
5 M
4 (a)
Explain call-by-value and call by reference with example.
10 M
4 (b)
Define a structure Employer with the following variables:-
(i) Employee code
(ii) Employee name
(iii) Employee salary
(iv) Employee designation
Write a program to read the structure for 10 employees and display record in sorted order of employee code.
(i) Employee code
(ii) Employee name
(iii) Employee salary
(iv) Employee designation
Write a program to read the structure for 10 employees and display record in sorted order of employee code.
10 M
5 (a)
What is operator Overloading? Overload operator += on complex number.
10 M
5 (b)
What is virtual function? What is its need?
5 M
5 (c)
What is abstract class? Give one example.
5 M
6 (a)
What is inheritance? Explain its types.
5 M
6 (b)
Explain logical operators. Write a C program to show the same.
10 M
6 (c)
What is dynamic binding? Write a program to implement it.
5 M
Write short notes on any four.
7 (a)
This pointer
5 M
7 (b)
Function overloading
5 M
7 (c)
Data abstraction and encapsulation
5 M
7 (d)
Access Specifiers
5 M
7 (e)
Friend Function
5 M
More question papers from Structured Programming Approach