0% found this document useful (0 votes)
74 views7 pages

C++ QP

Uploaded by

Gokulraj A
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)
74 views7 pages

C++ QP

Uploaded by

Gokulraj A
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/ 7
MAY END OF SEMESTER EXAMINATIONS APRIL OBJECT ORIENTED PROGRAMMING WITH C SUBJECT CODE: 22P3MATO SEMESTER MAX. MARKS: 75 MAJOR : M.Sc. MATHEMATICS TIME HOURS 1. What is +42 a) C+ is an object oriented programming language b) C+ is a procedural programming language c) C++ supports both procedural and object oriented programming language @) C+ is a functional programming language 2. Which operator is having the highest precedence? : a) postfix ) unary ©) shift 4) equality 3. Which is more effective while calling the functions? c) call by pointer d) call by object 1) call by value ») call by reference nea’ function? 4. Whar is the scope of the variable declared: iserd ] fe the {} block c) the main function 2) whole program b) only inside What is the role of a constructor in classes? a) To modify the data whenever required +b) To destroy an object ; = members of an object when it is created ¢) To initialize the data 4) To call private functions from the outer world 6. What is a copy constructor? 2) A constructor that allows a user to move data from one object to another b) A constructor to initialize an object with the values of another object ©) A constructor to check the whether to objects are equal or not d) A constructor to kill other copies of a given object. 7. What is Inheritance in C++? a) Wrapping of data into a single class b) Deriving new classes from existing classes ©) Overloading of classes ) Classes with same names 8. Whic is 4 hich concept of OOPs is shown by Virtual Funetions? Inheritance b) Encapsulation ) Polymorphism 9 Wine Reade leis required tous file UO operations? 4) ) 10. Which of the following is not ich t used as a file openi a) ios:trunk Hios:binay ag ios::in 4) header section d) Abstraction d) SECTION - B(SX 5 =25) “= ONS: ANSWER ALL! with their representations. data types along. rite ifferent 11. (a) Describe (OR) nding? Explain how to overload with example ator ove! (b) Define ope! i Describe inline funetion in C+ with examp 12. (a) Describe inl en ith example. jon with exam Jain Friend functt : : ae curate? Explain types of Constructor with example. tis C 13. (a) What is (OR) (b) Explain the use of destructor in C++. 14, (a) Explain uses of pointer in C++. (OR) (&) What is the use of this keyword in C++? 15, (a) Explain the role of seekg(),seekp(),tellg(),tellp(),function in the process of random access in a file. (OR) (®) Discuss Error handling during file operations. SECTION (SX8=40 ANSWER ALL QUESTIONS: 16. (a) Describe the Operators iff CHF (OR) (b) Explain any two if statements with example. 47.(@) Explain fanction overloading with example.) - (OR) () What is a virtual function? Write rules for virtual function. Explainswith example. eee 18. (a) Write a C++ program to demonstrate the overloading of a binary operator (OR) (b) Explain the manipulation of strings using operators 19. (@) Classify various Inheritance in C++ with example, (OR) () Define polymorphism and Explain Virtual functions with example, 20. (a) Describe the process of open, read, write and close files? (OR) (b) Analyze the concept of Object oriented design and analysis, ahh Section - A Answer all the questions (10%1= 50) 1. Late Binding is also Known as (a) Polymorphism (b) Paradigm (¢’) Dynamic Binding ( d ) Inheritance 2.- Insulation of Data From direct access by the Program is Called, (a) Inheritance (6) Data hiding —-(c ) data Abstraction (4) Encapsulation 3 . Which is not the member of class? (a) Static Function (b) Friend Function (.¢) Constant Punction (4) Virtual Function 4. Sqrt (x) Means (a) Natural Logarithm of x (1) Square of x (©) Trigonometric (4) X raised to power 1/2 Constractors can also be used to allocate memory While Creating (2) Functions (b) Class (0 Objects (d) None 6. Which of the Following Operator is Overloaded for cout? @)>> @O< OH @- 7. Which Concept allows us to reuse the writtend Code? (2) Encapsulation —_(b) Abstraction (¢ inheritance (d)Polymorphism 8An Class is one that is not used to Create Objects. (@) bese (ej abstract (©) derived (d) None 9. Provides Operation Common to the file Streams : z @ lfsteam (b) Of stream (OF stream base (d) F stream 10,.The Array of Pointers Represents a Collection of (@ addresses (®) Pointers (© variables (@)Functions Section -B Answer All the questions : (5*5=25) 11.a) Discuss the Basic Concepts of OOP? ; (or) & Explain the Structure of C++ Program }) Define Function ee and give an Example For Function Overloading b) Define and psp with an Example for function Overloading 13. a)Explain About Parameterized Constructor. Nee ® (or) Anediured b)Discuss on copy Constructor. : jrtual base classes wiiee aph in C++ For Virtual 14.2) Write Notes on Abstract Classes. @ ‘Virtual Functions. File. £5) Bap te Canepa in Ov or Opening ad Closing # @ » Explnin the Concept of Procedure ~ Oriented Paradigms (5*8=40) Section- Answer All the questions: 16. 2) Explain Tokens in C++ @ &) Discuss on Expressions and their types. 17. 2) Define Simple Class and Explain with an Example @ bf Write 2 Program in C++ the use of Objects as Function argument. ~ ~ 18. =f Write 2 C++ Program for the use of Overloaded Constructors form name (or) PRS ee DBR a oie En wes Gc ag — coe se ‘Single Inheritance , ine aa eae fon PRR 6s é sil sas ai b) Discuss pointers to Objects and Pointers to derived classes. 20. a) Explain the Classes for File Stream Operations (or) 6) Define class templates and Function templates. Also Write a C++ Program to G : a Swap( ) Function from the Function template for each set of, = oe A GOBI ARTS AND SCIENCE COLLEGE (AUTONOMOUS) DEPARTMENT OF MATHEMATICS PROGRAMMING IN C++ Class :1M S¢ Mathematics Total Marks : 25 Time : 1 Hour CIA oe Section = A Section snlaey Answer all the questions 1. Integer int_t= Integer (0,100) Nisa (a) Explicit Call (b) Implicit Call d+) Explicit and Implicit Call ‘ nt imag 2. Complex (float real , float imag=10) In Which the Default value of the argumet (d)#0 (¢) Not Explicit Call (a) Real (b) Complex (©)0 3. A Copy Constructor is used to __ (4) Declare an Object (c)) declare and initialize an object (b) initialize (d) delete an object 4. The derived class inherits of the Properties of the base class ——__—————~eyan (d) None = Ta 7 Some (¢) Some or All 5. Jn Multilevel inheritance, the Constructors are Executed (b) Public Part of Inheritance (a) Private Part (c) Tht Order 2 (4) Base Class = Section -B Answer any two questions (2x5=10) 6. Define a Constructor and give an Example. (or) Write the Special Characteristics of the Constructor Functions, 7. Explain the Parameterized Constructors, (or) Discuss on the Constructors with Default Arguments, Section -C (1*10=10) Answer the following question: 8. Explain dynamic Initialization of Objects and Construct Two dimensional arrays. 9. What are the different forms of inheritance? Explain with Examples, tie: Prepremaiing aie Oh T HS. Hebdenees Time: et Be, car} Max Herks 5 Nite Prey A. (8x125) ' ay AL ae questions ey —— > alldeabd with te dup qM eprrater. Ayepu lr memory) PAM a) Rom LThe dmallead ardiidual vaiks va a prea” are Kmown @) tokeng —bD Keywords €7 nay 4) Covsleaks 3, He Gaupt eatortlame prevedes Ha idia q 1 @ retabilty yy voabilily © » nenusalstlily ee bepioved ? A whith wn G Ke Housing vr & Regenr’ ay ksye ba hey te J gy asuck ee teh aan cans, ay manipulelion 2) enpraarten e) . dy shy coe faar-B (2x5 519) we wy the bi rae ne qa ct Denplain the ase y Conbel ttetumenda 7) what rh a frend funchon? : 3 (ey ay wee om line fumes wi ere B a) Derertbe He dittereat eapracihons 7 (ory b) Discuss tht Conk) Awe arctable wm Crt wh en 4p a) Deus Ha ruls for jue evrdoading A guibable Lamps (9 : by Explain foimbns te membins uh eoranphr. iii eons 2 9 Bed~ 8.7, S.10,3.01, 2.19, : 3.14, @ a2, a a4 j . 3 " |. Owit. re i> A.B - ab 2 AsVAre , 563,54, $9, 5.9- 5, SS, S14, F.1e | OME bray be Be bem B, RY BENS! He hy, ney TT | AMMEN > gar? ga ¢ pias age > sel ett Onit-9 DP WMH Mey, MA, fara, 1% AV A7 a - 7 ae mart vit : c M2, Ite, vee, I ae ee ay

You might also like