Loading
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Object Oriented Programming Using C++ Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.inUnit 1 : Introduction to c++1. What does a class in C++ holds?a) datab) functionsc) both data & functionsd) arrays2. How many specifiers are present in access specifiers in class?a) 1b) 2c) 3d) 43. Which is used to define the member of a class externally?a) :b) ::c) #d) !!$4. Which other keywords are also used to declare the class other than class?a) structb) unionc) objectd) both struct & union5. Which of the following is a valid class declaration?a) class A { int x; };b) class B { }c) public class A { }d) object A { int x; };6. The data members and functions of a class in C++ are by default ____________a) protectedb) privatec) publicd) public & protected7. Constructors are used to ____________a) initialize the objectsb) construct the data membersc) both initialize the objects & construct the data membersd) delete the objects
Page 1
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Object Oriented Programming Using C++ Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.inUnit 2 : Tokens, Expressions & Control Structure8. When struct is used instead of the keyword class means, what will happen in the program?a) access is public by defaultb) access is private by defaultc) access is protected by defaultd) access is denied9. Which category of data type a class belongs to?a) Fundamental data typeb) Derived data typec) User defined derived data typed) Atomic data type10. Which operator a pointer object of a class uses to access its data members and member functions?a) .b) ->c) :d) ::11. How the objects are self-referenced in a member function of that class.a) Using a special keyword objectb) Using this pointerc) Using * with the name of that objectd) By passing self as a parameter in the member function12. What does a mutable member of a class mean?a) A member that can never be changedb) A member that can be updated only if it not a member of constant objectc) A member that can be updated even if it a member of constant objectd) A member that is global throughout the class
Page 2
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Object Oriented Programming Using C++ Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.inUnit 3 : Functions in C++13. Pick the incorrect statement about inline functions in C++?a) They reduce function call overheadsb) These functions are inserted/substituted at the point of callc) Saves overhead of a return call from a functiond) They are generally very large and complicated function14. Inline functions are avoided when ____________________________a) function contains static variablesb) function have recursive callsc) function have loopsd) all of the mentioned15. 10. Pick the correct statement.a) Macros and inline functions are same thingb) Macros looks like function calls but they are actually notc) Inline functions looks like function but they are notd) Inline function are always large16. Which functions of a class are called inline functions?a) All the functions containing declared inside the classb) All functions defined inside or with the inline keywordc) All the functions accessing static members of the classd) All the functions that are defined outside the class17. Which keyword is used to define the user defined data types?a) defb) unionc) typedefd) type18. Identify the correct statement.a) typedef does not create different types. It only creates synonyms of existing typesb) typedef create different typesc) typedef create own typesd) typedef will not creates synonyms of existing types19. What does the data type defined by union will do?a) It allow one different portion of memory to be accessed as same data typesb) It allow one same portion of memory to be accessed as same data typesc) It allow one different portion of memory to be accessed as different data typesd) It allow one same portion of memory to be accessed as different data types
Page 3
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Object Oriented Programming Using C++ Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.in20. What is the syntax of user-defined data types?a) typedef ExistingDataType NameByUserb) typedef NameByUser ExistingDataTypec) def NameByUser ExistingDataTyped) def NameByUser ExistingData21. How many types of user-defined data type are in c++?a) 1b) 2c) 3d) 422. What is the scope of typedef defined data types?a) inside that block onlyb) whole programc) outside the programd) main function23. How many types of models are available to create the user-defined data type?a) 1b) 2c) 3d) 4
Page 4
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Object Oriented Programming Using C++ Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.inUnit 4 : Classes and Objects24. Where does the object is created?a) classb) constructorc) destructord) attributes25. How to access the object in the class?a) scope resolution operatorb) ternary operatorc) direct member access operatord) resolution operator26. Which of these following members are not accessed by using direct member access operator?a) publicb) privatec) protectedd) both private & protected27. Pick out the other definition of objects.a) member of the classb) associate of the classc) attribute of the classd) instance of the class28. How many objects can present in a single class?a) 1b) 2c) 3d) as many as possible29. Which special character is used to mark the end of class?a) ;b) :c) #d) $30. Pick the other name of operator function.a) function overloadingb) operator overloadingc) member overloadingd) object overloading
Page 5
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Object Oriented Programming Using C++ Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.in31. Which of the following operators can’t be overloaded?a) ::b) +c) –d) []32. How to declare operator function?a) operator signb) operatorc) name of the operatord) name of the class33. 8. Which of the following statements is NOT valid about operator overloading?a) Only existing operators can be overloadedb) The overloaded operator must have at least one operand of its class typec) The overloaded operators follow the syntax rules of the original operatord) None of the mentioned34. Operator overloading is ___________a) making c++ operator works with objectsb) giving new meaning to existing operatorc) making the new operatord) adding operation to the existing operators35. What is operator overloading in C++?a) Overriding the operator meaning by the user defined meaning for user defined data typeb) Redefining the way operator works for user defined typesc) Ability to provide the operators with some special meaning for user defined data typed) All of the mentioned36. What is the syntax of overloading operator + for class A?a) A operator+(argument_list){}b) A operator[+](argument_list){}c) int +(argument_list){}d) int [+](argument_list){}37. 6. How many approaches are used for operator overloading?a) 1b) 2c) 3d) 438. 7. Which of the following operator cannot be overloaded?a) +b) ?:
Page 6
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Object Oriented Programming Using C++ Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.inc) –d) %39. Which of the following operator can be overloaded?a) ?:b) ::c) .d) ==40. Which of the following operator cannot be used to overload when that function is declared as friendfunction?a) -=b) ||c) ==d) []41. 10. Which of the following operator can be used to overload when that function is declared as friendfunction?a) []b) ()c) ->d) |=42. In case of non-static member functions how many maximum object arguments a unary operatoroverloaded function can take?a) 1b) 2c) 3d) 043. In case of non-static member functions how many maximum object arguments a binary operatoroverloaded function can take?a) 1b) 2c) 3d) 044. In the case of friend operator overloaded functions how many maximum object arguments a unaryoperator overloaded function can take?a) 1b) 2c) 3d) 0
Page 7
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Object Oriented Programming Using C++ Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.in45. In the case of friend operator overloaded functions how many maximum object arguments a binaryoperator overloaded function can take?a) 1b) 2c) 3d) 046. What is a binary operator?a) Operator that performs its action on a single operandb) Operator that performs its action on two operandc) Operator that performs its action on three operandd) Operator that performs its action on any number of operands47. Which is the correct example of a binary operator?a) ++b) —c) Dereferencing operator(*)d) +48. Which is the correct example of a unary operator?a) &b) ==c) —d) /49. Which is called ternary operator?a) ?:b) &&c) |||d) ===50. Which is the correct statement about operator overloading?a) Only arithmetic operators can be overloadedb) Only non-arithmetic operators can be overloadedc) Precedence of operators are changed after overlaodingd) Associativity and precedence of operators does not change51. Pick the incorrect statements out of the following.a) Operator overloading does not disturbs the precedence of operatorsb) Arity of operators can be changed using operator overloadingc) No new operators can be createdd) All of the mentioned52. Which header file is used to declare the complex number?a) complexnum
Page 8
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Object Oriented Programming Using C++ Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.inb) complexc) complex numberd) complexarg53. How to declare the complex number?a) (3, 4)b) complex(3, 4)c) (3, 4i)d) (3, 4g)54. How many real types are there in complex numbers?a) 1b) 2c) 3d) 455. Which of the following is not a function of complex values?a) realb) imagc) normd) Cartesian56. What is the return type of the conversion operator?a) voidb) intc) floatd) no return type57. Why we use the “dynamic_cast” type conversion?a) result of the type conversion is a validb) to be used in low memoryc) result of the type conversion is an invalidd) it is used for storage58. Why we use the “dynamic_cast” type conversion?a) result of the type conversion is a validb) to be used in low memoryc) result of the type conversion is an invalidd) it is used for storage59. How many parameters does a conversion operator may take?a) 0b) 1c) 2d) as many as possible
Page 9
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Object Oriented Programming Using C++ Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.in60. How are types therein user-defined conversion?a) 1b) 2c) 3d) 461. Pick out the correct syntax of operator conversion.a) operator float()constb) operator float()c) operator constd) operator const()62. Which rule will not affect the friend function?a) private and protected members of a class cannot be accessed from outsideb) private and protected member can be accessed anywherec) protected member can be accessed anywhere63. Which keyword is used to declare the friend function?a) firendb) friendc) classfriendd) myfriend64. What is the syntax of friend function?a) friend class1 Class2;b) friend class;c) friend classd) friend class()65. Pick out the correct statement.a) A friend function may be a member of another classb) A friend function may not be a member of another classc) A friend function may or may not be a member of another classd) None of the mentioned66. Where does keyword ‘friend’ should be placed?a) function declarationb) function definitionc) main functiond) block function67. What is a friend function in C++?a) A function which can access all the private, protected and public members of a classb) A function which is not allowed to access any member of any class
Page 10
Download this file to view remaining 25 pages
Related documents:
- FULL TEST – I - Question Paper
- PRELIMS 2021 QUESTION PAPER – A SERIES - Question Paper
- Miscellaneous - Questions and answers - Notes
- Agricultural Engineering Paper I - Question Bank
- ANCIENT AND MEDIEVAL HISTORY Answer Key with Explanation - Question Bank
- Risk Management MCQs - MCQ
- Advanced Corporate Accounting - Notes
- MG6851 Principles of Management QBank - Question Bank
- Limit & Continuity (Solved MCQs and Notes) - Notes
- INTRODUCTION TO INTERNATIONAL BUSINESS - INTERNATIONAL BUSINESS - Notes
- LAW (Paper I) 2017 Question Paper - Question Paper
- HISTORY II 2015 question paper - Question Paper
- EXIM TRADE - INTERNATIONAL BUSINESS - Notes
- Prodcution and operations management MCQs with Answers - MCQ
- Titre préliminaire chapitre 2 - Question Paper
- Political Science and International Relations (Paper I) 2017 Question Paper
- International Trade - Question Bank
- TREND PERCENTAGES - FINANCIAL STATEMENT ANALYSIS - Question Paper
- CONCEPT RECAPITULATION TEST - II [CONCEPT RECAPITULATION TEST - II]
- Political Science and International Relations (Paper I) 2018 Question Paper