AMIETE – CS/IT (NEW SCHEME) – Code: AC55/AT55
NOTE: There are 9 Questions in all.
· Question 1 is compulsory and
carries 20 marks. Answer to Q.1 must be written in the space provided for it in
the answer book supplied and nowhere else.
· Out of the remaining EIGHT
Questions, answer any FIVE Questions. Each question carries 16 marks.
· Any required data not
explicitly given, may be suitably assumed and stated.
Q.1 Choose
the correct or the best alternative in the following: (210)
a. Which of the following is a properly defined
struct?
(A) struct {int a}; (B) struct employee {int a;}
(C) struct employee int a; (D) struct employee {int a};
b. Array subscripts in C++ always start at ________.
(A) –1 (B) 1
(C) 0 (D) value provided by user
c. What does the
inline keyword do?
(A) Indicates a function declaration.
(B) Tells the compiler to use
function in other programs.
(C) Causes all function calls to be
replaced by the code from the function.
(D) None of the above.
d. The operator
<< is called _______________.
(A) insertion operator (B) put to operator
(C) both (A) & (B) (D) None of these
e. What purpose do
classes serve?
(A) Data Encapsulation.
(B) Simplifying code Reuse.
(C) Provides convenient way of
modelling real-world objects.
(D) All of the above.
f. Which of the
following is the proper keyword to allocate memory dynamically in C++?
(A) new. (B) create.
(C) value. (D) if.
g. Operator overloading is ____________.
(A) making C++ operators operate on
objects
(B) not possible in C++
(C) both (A) & (B)
(D) None of the above
h. Which is not an
access specifier in C++?
(A) Protected. (B) Hidden.
(C) Private. (D) Public.
i. Templates in C++ enable programmers to _____________.
(A) write friend functions
(B) define generic classes and
functions
(C) write inline functions
(D) none of the above
j. Which of the
following is the type of inheritance in C++?
(A) Multilevel Inheritance. (B) Multiple Inheritance.
(C) Hybrid Inheritance. (D) All the above.
Answer any FIVE Questions out
of EIGHT Questions.
Each question carries 16
marks.
Q.2 a. What is Procedure Oriented Programming system
(POP)? List the drawbacks of POP. (6)
b. What is Object
Oriented Programming? List and explain
various features of OOPs. (10)
Q.3 a. Explain
do-while statement with an example. (4)
b. What is the relationship between an array and a
pointer? What is the difference? (4)
c. Write a C++
program to create a structure data type to store name and salary of an
employee. Define a member function to display the details of a given employee. (8)
Q.4 Discuss the following with an example:
(i)
Reference variables. (ii) Function overloading.
(iii)
Default arguments. (iv)
Return by reference. (4 4)
Q.5 a. What is a class? Explain the structure of a class with the
help of an example. (5)
b. List and
explain the keywords used to control the access to members of a class. (5)
c. Explain
the different types of constructors with suitable examples. (6)
Q.6 a. Define
operator overloading with syntax. List
the operators that cannot be overloaded in C++. (8)
b. Write a C++ program to add two COMPLEX
objects by overloading binary + operator.
Declare the operator function as a member function of COMPLEX class. (8)
Q.7 a. What is parametric polymorphism? (4)
b. What is inheritance? Explain different types of inheritance with
suitable diagram and syntax. (12)
Q.8 a. What
is a template? Write a C++ program to
find greatest of two numbers using class template. (12)
b. What is
Exception handling? (4)
Q.9 Write
short note on:-
(i)
IO stream class Hierarchy.
(ii)
Standard template library. (82)