1) We can overload which of the following C++ operators. A) Arithmetic operator (+,-, *,) B)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1) We can overload which of the following C++ operators. A) Arithmetic operator (+,-, *,) B) Class Member Access Operators (., .*) C) Size operator(sizeof) D) Conditional operator(?:) must be either non-static member function or friend functions. 2) A) member functions B) Operator functions C) non-static functions D) friend functions 3) Operator overloading is also called A) run time B) initial time C) compile time D) completion time . polymorphism. 4) We can overload almost all the C++ operators except the following. i) Class member operator (...*) ii) Assignment operator (=) iii) Scope resolution operator (::) iv) Conditional operator (?:) A) i, ii and iii only B) ii, iii and iv only C) i, iii and iv only D) All i, ii, iii and iv 5) Which of the following is the correct order involves in the process of operator overloading. i) Define the operator function to implement the required operations. ii) Create a class that defines the data type that is to be used in the overloading operation. iii) Declare the operator function op() in the public part of the class. A) 1-1, 2-11, 3-iii B) 1-ii, 2-iii, 3-i C) 1-ii, 2-1, 2-iii D) 1-iii, 2-ii, 3-i 6) State whether the following statements are True or False for overloading operators. i) Only existing operators can be overloaded. ii) We can change the basic meaning of an operator A) True, True B) True, False C) False, True D) False, False U 7) We cannot use friend functions to overload which of the following operators. i) membership operator(.) ii) Assignment operator(-) iii) class member access operator(>) iv) conditional operator(?:) A) i and ii only B) ii and iii only C) iii and iv only D) i and iv only 8) ............... overloaded by means of a member function, take no explicit arguments an- return no explicit values. A) Unary operators B) Binary operators C) Arithmetic operators D) Function operator 9) ................ overloaded through a member function take one explicit argument and tho- which are overloaded through a friend function take two explicit arguments. A) Unary operators B) Binary operators C) Arithmetic operators D) Function operator 10) When using ... overloaded through a member function, the left-hand opera must be an object of the relevant class. A) Unary operators B) Binary operators C) Arithmetic operators D) Function operator 10) When using ....... ....., overloaded through a member function, the left-hand operand must be an object of the relevant class. A) Unary operators B) Binary operators C) Arithmetic operators D) Function operator 11) Operator overloading is done with the help of a special function called ........ describes the special task of an operator. A) overloading function B) special task function C) detail function D) operator function I 12) The compiler does not support automatic type conversions for the ....... A) basic B) user-defined C) class D) automatic which . data type. 13) The casting operator function should satisfy which of the following conditions. i) It must be a class member ii) It must not specify the return type iii) It must not have any arguments A) i and ii only B) ii and iii only C) i, iii only D) All i, ii and iii 14) The conversion from a class to any other type or any other class should make use of a in the source class. A) casting operator B) constructor C) not applicable D) operator function 15) To perform the conversion from any other data type or class to a class type, a should be used in the destination class. I A) casting operator B) constructor C) not applicable D) operator function 16) The general form of an overloaded casting operator function usually referred to as a A) casting function B) operator function C) conversion function D) overloaded function 15) To perform the conversion from any other data type or class to a class type, a .............. should be used in the destination class. A) casting operator B) constructor C) not applicable D) operator function 16) The general form of an overloaded casting operator function usually referred to as a A) casting function B) operator function C) conversion function D) overloaded function 17) Operator overloading provides a flexible option for the creation of new. most of the C++ operations. A) class B) function C) object D) definitions 18) In the case of. reference. A) private B) friend C) member D) public I function, arguments may be passed either by value or by for 1) We can overload which of the following C++ operators. A) Arithmetic operator (+,-, *,) B) Class Member Access Operators (., .*) C) Size operator(sizeof) D) Conditional operator(?:) must be either non-static member function or friend functions. 2) A) member functions B) Operator functions C) non-static functions D) friend functions 3) Operator overloading is also called A) run time B) initial time C) compile time D) completion time . polymorphism. 4) We can overload almost all the C++ operators except the following. i) Class member operator (...*) ii) Assignment operator (=) iii) Scope resolution operator (::) iv) Conditional operator (?:) A) i, ii and iii only B) ii, iii and iv only C) i, iii and iv only D) All i, ii, iii and iv 5) Which of the following is the correct order involves in the process of operator overloading. i) Define the operator function to implement the required operations. ii) Create a class that defines the data type that is to be used in the overloading operation. iii) Declare the operator function op() in the public part of the class. A) 1-1, 2-11, 3-iii B) 1-ii, 2-iii, 3-i C) 1-ii, 2-1, 2-iii D) 1-iii, 2-ii, 3-i 6) State whether the following statements are True or False for overloading operators. i) Only existing operators can be overloaded. ii) We can change the basic meaning of an operator A) True, True B) True, False C) False, True D) False, False U 7) We cannot use friend functions to overload which of the following operators. i) membership operator(.) ii) Assignment operator(-) iii) class member access operator(>) iv) conditional operator(?:) A) i and ii only B) ii and iii only C) iii and iv only D) i and iv only 8) ............... overloaded by means of a member function, take no explicit arguments an- return no explicit values. A) Unary operators B) Binary operators C) Arithmetic operators D) Function operator 9) ................ overloaded through a member function take one explicit argument and tho- which are overloaded through a friend function take two explicit arguments. A) Unary operators B) Binary operators C) Arithmetic operators D) Function operator 10) When using ... overloaded through a member function, the left-hand opera must be an object of the relevant class. A) Unary operators B) Binary operators C) Arithmetic operators D) Function operator 10) When using ....... ....., overloaded through a member function, the left-hand operand must be an object of the relevant class. A) Unary operators B) Binary operators C) Arithmetic operators D) Function operator 11) Operator overloading is done with the help of a special function called ........ describes the special task of an operator. A) overloading function B) special task function C) detail function D) operator function I 12) The compiler does not support automatic type conversions for the ....... A) basic B) user-defined C) class D) automatic which . data type. 13) The casting operator function should satisfy which of the following conditions. i) It must be a class member ii) It must not specify the return type iii) It must not have any arguments A) i and ii only B) ii and iii only C) i, iii only D) All i, ii and iii 14) The conversion from a class to any other type or any other class should make use of a in the source class. A) casting operator B) constructor C) not applicable D) operator function 15) To perform the conversion from any other data type or class to a class type, a should be used in the destination class. I A) casting operator B) constructor C) not applicable D) operator function 16) The general form of an overloaded casting operator function usually referred to as a A) casting function B) operator function C) conversion function D) overloaded function 15) To perform the conversion from any other data type or class to a class type, a .............. should be used in the destination class. A) casting operator B) constructor C) not applicable D) operator function 16) The general form of an overloaded casting operator function usually referred to as a A) casting function B) operator function C) conversion function D) overloaded function 17) Operator overloading provides a flexible option for the creation of new. most of the C++ operations. A) class B) function C) object D) definitions 18) In the case of. reference. A) private B) friend C) member D) public I function, arguments may be passed either by value or by for
Expert Answer:
Answer rating: 100% (QA)
The detailed answer for the above question is provided below 1 A D Answer The C operators that can be overloaded are the Arithmetic operators etc Class Member Access Operators Size operatorsizeof and ... View the full answer
Related Book For
Auditing and Assurance Services
ISBN: 978-0077862343
6th edition
Authors: Timothy Louwers, Robert Ramsay, David Sinason, Jerry Straws
Posted Date:
Students also viewed these electrical engineering questions
-
Which of the following functions are periodic? For each periodic function, identify the period. b. 80 -1
-
Which of the following operators are Hermitian: d/dx, id/dx, 4d2/dx2, id2/dx2? (See Prob. 7.6.)
-
Which of the following functions lie in span{cos2x, sin2x}? (Work in F[0, ].) (a) 1 (b) 1 + x
-
10 J of heat are removed from a gas sample while it is being compressed by a piston that does 20 J of work. What is the change in the thermal energy of the gas? Does the temperature of the gas...
-
Which of the following activities most likely would be considered a weakness in an entitys internal control over payroll? a. A voucher for the amount of the payroll is prepared in the general...
-
FIFO, LIFO, and Average Cost Determination LoBianco Company's record of transactions for the month of April was as follows. (a) Assuming that periodic inventory records are kept, compute the...
-
Refer to Samsungs financial statements in Appendix A. Compute its debt ratio as of December 31, 2015, and December 31, 2014. Data From Samsung Financial Statement Appendix A Samsung Electronics Co.,...
-
Rapid Auto has over 200 auto-maintenance service outlets nationwide. It provides primarily two lines of service: oil changes and brake repair. Oil change-related services represent 65% of its sales...
-
Explain entity integrity and referential integrity rules in relational model. Show how these are realized in SQL.
-
Lee, Danny and Sue were childhood friends. They loved horses and dreamed of one day owning a horse who won the huge prize money in the famous annual Melbourne Cup horse race. To fulfill this dream,...
-
Bahrain, Inc. sells a single product. The company's most recent income statement is given below. Sales (4,000 units) $120,000 Less variable expenses (68,000) Contribution margin 52,000 (40,000) Less...
-
This is an audit of Personal contributions> Concessional>Non concessional - What records would you expect to produce -? you have to name the records/documents etc
-
Includes a complete discussion of income from student tuition compared to the overall outlay of salary for instructors and what other variables should be considered when looking at funding for...
-
Four methods are principally used to account for an investment in equity securities along with a fair value option. What are each of the four methods and what does each involve?
-
Using DeMorgan's theorem, convert the following Boolean expressions to equivalent expressions that have only OR and complement operations. Show that the functions can be implemented with logic...
-
3. A company is planning the financing of a major expansion. It will use common stock to fund this expansion. The company currently has 300,000 shares outstanding selling at an average of $130 per...
-
In 2020, Pop Construction Corp. began work on a contract for $ 3,700,000. Other details follow: 2020 Costs incurred during the...
-
For liquid water the isothermal compressibility is given by; where r and b are functions of temperature only. If 1 kg of water is compressed isothermally and reversibly from I to 500 bar at 60(C. how...
-
An audit plan to examine long- term debt most likely would include steps that require a. Comparing the carrying amount of held- to- maturity securities with their year- end market values. b....
-
Generally accepted auditing standards (the performance principle) require auditors to gather sufficient appropriate evidence on which to base an opinion. Required: a. Briefly define the...
-
What are the advantages and disadvantages of documenting internal control by using (1) an internal control questionnaire, (2) a narrative memorandum, and (3) a flowchart?
-
An atom loses an electron to another atom. Is this an example of a physical or chemical change? (a) chemical change involving the formation of ions (b) physical change involving the formation of ions...
-
Aluminum ions carry a 3+ charge, and chloride ions carry a 1- charge. What is the chemical formula for the ionic compound aluminum chloride? (a) Al 3 Cl (b) AlCl 3 (c) Al 3 Cl 3 (d) AlCl
-
Why are ores so valuable? (a) They are sources of naturally occurring gold. (b) Metals can be efficiently extracted from them. (c) They tend to occur in scenic mountainous regions. (d) They hold many...
Study smarter with the SolutionInn App