Save as PDF

Opens your browser print dialog — select "Save as PDF" to download.

[2]

IT-304 (GS)

B.Tech., III Semester

Examination, December 2023

Grading System (GS)

Object Oriented Programming and Methodology

Time : Three Hours

Maximum Marks : 70

Note:

  1. Attempt any five questions.

    किन्हीं पाँच प्रश्नों को हल कीजिए।

  2. All questions carry equal marks.

    सभी प्रश्नों के समान अंक हैं।

  3. In case of any doubt or dispute the English version question should be treated as final.

    किसी भी प्रकार के संदेह अथवा विवाद की स्थिति में अंग्रेजी भाषा के प्रश्न को अंतिम ��ाना जायेगा।

1.

a) What are the different features of Object Oriented programming? How C++ is different for C language?

ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग की विभिन्न विशेषताएँ क्या हैं? C भाषा के लिए C++ किस प्रकार भिन्न है?

b) Explain with examples of different types of inheritance. Why multiple inheritance can induce complexity in the program?

विभिन्न प्रकार के वंशानुक्रमों को उदाहरण सहित समझाइए। एकाधिक वंशानुक्रम कार्यक्रम में जटिलता क्यों उत्पन्न कर सकते हैं?

2.

a) Explain the purpose of the constructor in C++. Demonstrate calling one constructor from another in the case of constructor overloading.

C++ में कंस्ट्रक्टर के उद्देश्य की व्याख्या करें। क��स्ट्रक्टर ओवर लोडिंग के मामले में एक कंस्ट्रक्टर को दूसरे से कॉल करने को प्रदर्शित करें।

b) Explain operator overloading using some unary operator. Also, discuss pros and cons of it.

कुछ यूनेरी ऑपरेटर का उपयोग करके ऑपरेटर ओवर लोडिंग की व्याख्या करें। साथ ही इस के पक्ष-विपक्ष पर चर्चा करें।

3.

a) Explain any two ways through which we can give input in C++ program.

किन्हीं दो तरीकों की व्याख्या करें जिनके द्वारा हम C++ प्रोग्राम में इनपुट दे सकते हैं।

b) How structures are different from class? Illustrate it with a program.

संरचना वर्ग से किस प्रकार भिन्न है? इसे एक कार्यक्रम के साथ प्रदर्शित करें।

4.

a) Compare structure with class with an example.

एक उदाहरण के साथ वर्ग के साथ संरचना की तुलना करें।

b) Explain the concept of new and delete in memory management concept.

मेमोरी मैनेजमेंट कांसेप्ट में नए और डिलीट की अवधारणा की व्याख्या करें।

[3]
[4]
5.

Differentiate among the following with an example:

निम्नलिखित में से एक उदाहरण के साथ अंतर करें:

  1. Abstract and non-abstract classes

    सार और गैर-सार वर्ग

  2. Runtime and compile-time polymorphism

    रनटाइम और संकलन-समय बहुभुजता

6.

a) Explain different keywords used for handling exceptions at run time.

रनटाइम पर अपवादों को संभालने के लिए उपयोग किए जाने वाले विभिन्न खोज शब्दों की व्याख्या करें।

b) Discuss following functions:

निम्नलिखित को उदाहरण सहित समझाइए।

  1. Virtual functions

  2. Pure functions

  3. Friend functions

  4. Static functions

निम्नलिखित कार्यों पर चर्चा करें।

  1. आभासी कार्य

  2. शुद्ध कार्य

  3. मित्र कार्य

  4. स्थिर कार्य

7.

a) Write a programme in C++ that demonstrates how to use inline member functions and publish it? Discuss both the similarities and differences between macros and inline functions as well.

C++ में एक प्रोग्राम लिखें जो दर्शाता है कि इनलाइन सदस्य कार्यों का उपयोग कैसे करें और इसे प्रकाशित करें? मैक्रोज़ और इनलाइन फ़ंक्शंस के बीच समानता और अंतर दोनों पर भी चर्चा करें।

b) Discuss how C++ deals with memory management? Show an example of clearing a memory used by an object.

चर्चा करें कि C++ स्मृति प्रबंधन से कैसे ���ंबंधित है? किसी ऑब्जेक्ट द्वारा उपयोग की गई मेमोरी को साफ करने का एक उदाहरण दिखाएं।

8.

Explain the following with an example:

निम्नलिखित को उदाहरण सहित समझाइए।

a) File I/O

अ) फ़ाइल I/O

b) Debugging pointer

ब) डिबगिंग सूचक