0% found this document useful (0 votes)
36 views8 pages

C++ Pro QP

This document outlines the examination structure for a Master's degree in Mathematics focusing on Computer Programming (C++ Theory) for candidates admitted from 2020 onwards. It includes sections with multiple-choice questions, short answer questions, and detailed essay questions covering various C++ concepts such as inheritance, polymorphism, operator overloading, and file handling. The exam is designed to test the understanding of both theoretical and practical aspects of C++ programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
36 views8 pages

C++ Pro QP

This document outlines the examination structure for a Master's degree in Mathematics focusing on Computer Programming (C++ Theory) for candidates admitted from 2020 onwards. It includes sections with multiple-choice questions, short answer questions, and detailed essay questions covering various C++ concepts such as inheritance, polymorphism, operator overloading, and file handling. The exam is designed to test the understanding of both theoretical and practical aspects of C++ programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 8
Reg. No. : AB2ZA OMe 3400 Q.P. Code : [21 21 26] (Vor the candidates admitted during 2021 onwards) M.Se. DEGREE EXAMINATION, MAY 2023. Fourth Semester Mathematics COMPUTER PROGRAMMING (C++ THEORY) Time: Three hours Maximum : 50 marks SECTION A — (10 x 1= 10 marks) Answer ALL questions. - Choose the correct answer : 1. Which of the following can show polymorphism? q (a) over loading && (b) over loading | | (c) over loading < < (d) over loading + = Ty co) ® © @ cal range of unsigned int? 127 0 127 010 65585 0 t0 4294967295, 21ATASSGAS to 2147489648 Constant function in C++ can be declared as @ » © @ Whe: @ ® © @ Whi @ ) © @ void display () void display () const const void display () void const display () sre does the execution of the program starts? User defined function Void function Main function None of the above +h of the following is called as abstract class? ‘Virtual function Derived class Pure virtual function None of the above 2 3400 Constructor i executed when (9) object goos out of scope () a clase in declared (©) amobject is created (an object is used header file used for manipulators (0) ©) (@) Which design patterns benefit from the multiple inheritance? (@) Adapter and observer pattern ©) Code pattern © Give pattern (@) None of the above Which header file is required to use the file /O operations? (@) — @) (©) @ a 3400 10. 1. oO 12, 13, ewe have object from ofstream class then deft rode of opening the file is (a) oe:sin @) ios: out = infos © ios trun @) fos ::outios :: trunk SECTION B— (6 « 8 = 15 marks)_ “Answer ALL questions, (a) What do you mean by dynamic binding? How is it useful in OOP? or (®) What are the applications of void data type inCH#? (@) How does an inline function differ from a preprocessor macro?" Or (@) What is the significance of an empty parenthesis in a function declaration? (a) How is @ member function of a class defined? Or ©) What is a parameterized constructors? 4 3400 16. © o @ o o Why is it necessary to overload an operator? or What does inheritance mean in C++? What are input and output streams? Explain with an example. or Describe the various clas operations, 38 available for file SECTION C— (x 25 marks) Answer ALL questions. Deseribe inheritance as applied to OOP. Or Explain the major’ use of an reference variable. Describe the different styles of writing prototypes. Or What is the main advantages of passing arguments by reference? 5 3400 18. 19. (a) (by (a) (b) (a) (b) How does a CH structure diffor fron 4 Che class? Or explain the function of default constructor When is a friend function compulsory? Give an example. Or Describe the syntax of the single inheritance in C++. Describe briefly the features of I/O system supported by C++. Or What is a file mode? Describe the various file mode options available. 6 3400 Reg. No.: 4242 Q.P. Code : [202142] (or the candidates admitted from 2020 onwards) M.Sc. DEGREE WXAMINATION, JUNE 2022. Fourth Semester Mathematics COMPUTER PROGRAMMING (C++ THEORY) Time : Three hours Maximum : 75 marks SECTION A — (10 x 1=10 marks) Answer ALL questions. In C++, we can give several meanings to an \ operator, depending upon the types of arguments used, which was known ag ———___ (a) _ Operator variable Operator overloading (©) Operator loading wt (a) Operator manipulation Which of the following are the pointer to member operator used in C++ Yer @oon Gi): Git) * Gv) i (a) @) and (ii) only Gi) and (iii) only (©) @and (iv) only @) ii) and (iv) only = amber of so anny’ ini mae Gb ambe prevented in C44 @o wo ore @ 3 nary scope ressTution operator is denoted by @" %% © or Like constructors, can there be more than one dostructors in a class? a © @ ea pal Beisel Bec denhie oh Oia inset nae o canmscad spent @ may be can't aay When a class overrides the function of base class C+ provides for which allows a derived class to inherit from many base classes, even ifthe hase classes are unrelated. (a) Multilevel inheritance (©) Single level inheritance (© Multiple inheritane i @. Hierarchical inheritance 8, a 10. b What is moant by multiple inheritance? ‘@ © {97 Deriving n derived class from more than one we clans Deriving a base elass from derived class Doriving a derived class from base class (a) Allofthem Pe et [None of the mentioned High level stream processing Tosco Ww eavow’ 6 loe © te © four SECTION B— 6 +8=25 marks) ‘newer ALL questo 11, (@) What is procedure -ovinte programming? &) What are its main characteristics? 4 Or 2 ©) Desai, with camps a abe q 5) 8 szs 12. | @ © ® 4. @ Qw a) © | What is the most significant advantage thag What is the Ming. references instead "of you, pointers’ or at inthe significance, of” an omy Wat ia fetion declaration? “"?™ What are objects? How are they created? or Can we use the same function name for a member function of a class and an outside Finction in the same program file? If ye how are they distinguished? If no, give [A friend function ean not be used to overload, the assignment operator = Explain why? or When do wee ‘use the protected visibility specifier to a class member? What is the role of file() function? When do we use this function? or What are the advantages of saving data in binary form? 4 4242, 1, G “sey By SECTION C — (6 «8 = 40 marks) Answer ALL questions Distinguish between the following torms: Objects and classes (Data abstraction and data ceneapsulation GG) Inheritance and polymorphism Gv) Dynamic binding and message passing. or lustrate with an examples ‘manipulator works, , how the skew What do we mean by overloading of a function? Explain with an example when do wwe use this concept. or Describe the different styles of writing prototypes. What is a friend function? what’ are the merits and demerits of “using friond functions? or 5 4242 20. (b) (@) (a) ) Deseribe the mechanism of accessing data members and member functions jn the following cases: (i) Inside the main program (ii) Inside a member function of the same class ii) Inside a member function of another class How many arguments are required in the definition of an overloaded unary operator? Or Describe the syntax of multiple inheritance. When do we use such an inheritance? What ‘is the basic difference between manipulators and ios member functions in implementation? Give examples. Or Describe how would you determine number of objects in a file. When do you need such information?

You might also like