You are on page 1of 3

Seat No.: ________ Enrolment No.

______________

GUJARAT TECHNOLOGICAL UNIVERSITY


DIPLOMA ENGINEERING – SEMESTER – IV EXAMINATION –WINTER - 2018

Subject Code:3341602 Date: 22-11-2018


Subject Name: OBJECT ORINTED PROGRAMMING
Time:02:30 PM TO 05:00 PM Total Marks: 70
Instructions:

1. Attempt all questions.


2. Make Suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Use of programmable & Communication aids are strictly prohibited.
5. Use of only simple calculator is permitted in Mathematics.
6. English version is authentic.

Q.1 Answer any seven out of ten. દશમ ાંથી કોઇપણ સ તન જવ બ આપો. 14
1. Describe the use of scope resolution operator.
૧. સ્કોપ રેઝોલ્યુશન ઓપરેટરનો ઉપયોગ જણ વો.
2. What is ‘this’ pointer?
૨. ‘this’ પોઈન્ટર શુાં છે ?
3. Define inline function.
૩. ઇનલ ઇન ફાંક્શન વ્ય ખ્ય યયત કરો.
4. Explain base class and derived class.
૪. બેઝ ક્લ સ અને ડીર ઈવ ક્લ સ સમજાવો.
5. What is abstract class?
૫. એબ્સ્ટસ્રેક્ટ ક્લ સ શુાં છે ?
6. Define: Encapsulation, Polymorphism
૬. વ્ય ખ્ય આપો: એનકેપ્સસ્યુલેશન, પોલીમોફીઝમ
7. Explain the working of << operator with cout.
૭. cout સ થે << ઓપરેટરનુાં ક યય સમજાવો.
8. Provide the name of two header files used in C++ and not in C.
૮. જે C++ મ ાં જ ઉપયોગી હોય અને C મ ાં ન હોય તેવી બે હેડર ફ ઈલ જણ વો.
9. What is the use of file stream class?
૯. ફ ઈલ સ્રીમ ક્લ સનો શુાં ઉપયોગ છે ?
10. Show the use of “endl” with example.
૧૦. “endl” નો ઉપયોગ ઉદ હરણ સ થે દશ યવો.

Q.2 (a) Which are the characteristics of Object Oriented Programming? 03


પ્રશ્ન. ર (અ) ઓબ્સ્ટજેક્ટ ઓરરયેન્ટેડ પ્રોગ્ર મમાંગની લ ક્ષયણકત ઓ કઈ કઈ છે ? ૦૩
OR
(a) Explain destructor with example. 03
(અ) રડસ્રક્ટરને ઉદ હરણ સ થે સમજાવો. ૦૩
(b) Explain reference variable with example. 03
(બ) રેફરન્સ વરીયેબલ ઉદ હરણ સ થે સમજાવો. ૦૩
OR
1/3
(b) Explain default argument. 03
(બ) ડીફોલ્ટ આર્ગયુયમેન્ટ સમજાવો. ૦૩
(c) Write a program that demonstrate the function overloading. 04
(ક) ફાંક્શન ઓવરલોડીંગ દશ યવતો પ્રોગ્ર મ લ ખો. ૦૪
OR
(c) What are the differences between class and structure in C++? 04
(ક) C++મ ાં ક્લ સ અને સ્રક્ચર વચ્ચે કય કય તફ વતો છે ? ૦૪
(d) Explain type casting. 04
(ડ) ટ ઇપ ક મસ્ટાંગ સમજાવો. ૦૪
OR
(d) Show the difference of public and private access specifier using program. 04
(ડ) પ્રોગ્ર મ દ્વ ર public અને private એક્સેસ સ્પેસીફ યરનો તફ વત દશ યવો. ૦૪

Q.3 (a) List out the types of inheritance with diagram. 03


પ્રશ્ન. 3 (અ) ઇન્હેરીટાંસન પ્રક રોની આકૃયત સ થે ય દી બન વો. ૦૩
OR
(a) Explain static keyword with example. 03
(અ) static કીવડય ઉદ હરણ સ થે સમજાવો. ૦૩
(b) Explain the need of virtual base class in inheritance. 03
(બ) ઇન્હેરીટાંસમ ાં વચ્યુયઅલ બેઝ ક્લ સની આવશ્યકત સમજાવો. ૦૩
OR
(b) What is File? List the various file opening modes in C++. 03
(બ) ફ ઈલ શુાં છે ? C++ન ફ ઈલ ઓપન કરવ ન યવયવધ મોડ જણ વો. ૦૩
(c) Write a program for Multilevel inheritance. 04
(ક) મલ્ટીલેવલ ઇન્હેરીટાંસ મ ટે પ્રોગ્ર મ લખો. ૦૪
OR
(c) Write a program for Multiple inheritance. 04
(ક) મલ્ટીપલ ઇન્હેરીટાંસ મ ટે પ્રોગ્ર મ લખો. ૦૪
(d) Explain function overriding with example. 04
(ડ) ફાંક્શન ઓવરર ઈડીંગ ઉદ હરણ સ થે સમજાવો. ૦૪
OR
(d) Explain the need of “protected” in inheritance. 04
(ડ) ઇન્હેરીટાંસમ ાં “protected”ની આવશ્યકત સમજાવો. ૦૪

Q.4 (a) Explain use of new and delete operators in C++. 03


પ્રશ્ન. ૪ (અ) C++મ ાં new અને delete ઓપરેટરનો ઉપયોગ સમજાવો. ૦૩
OR
(a) Describe the structure of C++ program. 03
(અ) C++ ન પ્રોગ્ર મનુાં સ્રક્ચર વણયવો. ૦૩
(b) Explain call by reference with example. 04
(બ) કોલ બ ય રેફરન્સ ઉદ હરણ સ થે સમજાવો. ૦૪
OR
(b) Explain pure virtual function with example. 04
(બ) પ્સયોર વચ્યુયઅલ ફાંક્શન ઉદ હરણ સ થે સમજાવો. ૦૪

(c) Define a class Distance with data members: meter and centimeter in integer. 07
2/3
Define default, parameterized and copy constructor for the class. Write an
appropriate main( ) to test the class.
(ક) જે ન ડેટ મેમ્બર meter અને centimeter ઈન્ટીજરમ ાં હોય તેવો એક ક્લ સ વ્ય ખ્ય યયત કરો. તે ૦૭
ક્લ સ મ ટે ડીફોલ્ટ, પેર મીટર ઈઝ અને કોપી કન્સ્રક્ટર વ્ય ખ્ય યયત કરો. ક્લ સનુાં પરરક્ષણ કરવ
સુયોર્ગય main( ) લખો.
Q.5 (a) Describe the characteristics of a friend function. 04
પ્રશ્ન. ૫ (અ) ફ્રેન્ડ ફાંક્શનની લ ક્ષયણકત ઓ જણ વો. ૦૪
(b) Give the differences between object oriented programming and procedure 04
oriented programming.
(બ) ઓબ્સ્ટજેક્ટ લક્ષી પ્રોગ્ર મમાંગ અને પ્રોસીજર લક્ષી પ્રોગ્ર મમાંગન તફ વતો આપો. ૦૪
(c) Explain the functions: width( ), precision( ), fill( ). 03
(ક) width( ), precision( ), fill( ) ફાંક્શન સમજાવો. ૦૩
(d) Which are the types of polymorphism? Explain any one. 03
(ડ) પોલીમોફીઝમન પ્રક રો કય કય છે ? કોઈ એક સમજાવો. ૦૩

************

3/3

You might also like