LOADING

Questions

BE - SEMESTER-IV (New) EXAMINATION - WINTER 2015 -Winter-Jan-2016

Q-1(a)

(a)  Explain the benefits of Object Oriented Programming.

 

(7)
Q-1(b)

(b)  Explain the difference between structure and class in C++.
 

(7)
Q-2(a)

(a)What do you mean by call by value and call by reference? Justify your answer
with suitable example.

(7)
Q-2(b)

(b)  What  is  friend  function? Write a program  to  find out sum of  two private data
members  x  and  y  of  two  classes  A  and  B  using  a  common  friend  function.
Assume that the prototype for both the classes will be void sum (A, B); 

(7)
ORQ-2(b)

(b)Describe The Following Terms In C++ With Example
i)  Default Argument. ii) Function Overloading. iii) Destructor iv) this pointer

(7)
Q-3(a)

    
(a)  What  are  the  characteristics  of  constructor  in  C++?  Write  a  program  to
illustrate the use of copy constructor.
07

(7)

(a)  Explain  type  conversion  from  class  type  to  basic  type  and  one  class  type  to
another class type with suitable example.

Q-3(b)

(b)  Write  down  the  uses  of  static  data member  and  static member  function with
suitable example. 

(7)
ORQ-3(b)

(b)  What is an operator function? Write a program to overload binary + operator as
a member function.

(7)
Q-4(a)

  
  (a)  What  is  inheritance? Why do we use of protected specifier for base class data
members in inheritance? Explain hybrid inheritance with example.

(7)

(a)  What is a stream? Describe various stream classes for console I/O operations in
C++.

Q-4(b)

(b)  Explain  various  file mode  parameters  in  C++. Write  a  program  to  copy  the
contents  of  a  source  file  student1.txt  to  a  destination  file  student2.txt
character by character.

(7)
ORQ-4(b)

(b)  What  is  polymorphism?  How  is  it  achieved  in  C++?  Explain  with  suitable
example.
 

(7)
Q-5(a)

(a)  Explain catch all exception and multiple catch exception with example.

(7)
ORQ-5(a)

 
(a)What  is  the purpose of using  template  in C++? Explain  template function and
template class with example. 

(7)
Q-5(b)

(b)Consider the following class structure as shown in the figure. The class Result derives  information  from  the  classes  Internal,  University  and  External respectively.

The  Internal  and External  classes  access  information  from  the Student class. Define all five classes and write a suitable program to create and
display the information contained in Result object.

(7)
ORQ-5(b)

(b)Explain the mechanism of keywords try, throw and catch to handle Exceptions
in C++. Explain with an example like “division by zero” situation.

(7)