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...
-
Romano Lakes Resort reported the following on its balance sheet at December 31, 2010: Property, plant, and equipment, at cost: Land......................................................... $ 146,000...
-
Figure 6.37 shows a venturi meter with a U-tube manometer to measure the velocity of flow. When no flow occurs, the mercury column is balanced and its top is 300 mm below throat. Compute the volume...
-
How to locate assets of the debtor?
-
As a manager employed by Want-It-Now Rapid Delivery Service, you are responsible for pricing the services involving same-day deliveries. Among your primary concerns is the competitive aspects of your...
-
Krylon Company purchases eight special tools annually from CO., Inc. The price of these tools has increased each year, reaching $130,000 per unit last year. Because the purchase price has increased...
-
A financing of 300000mts contracted at a rate of 24% per month will be amortized over 5 periods, that is, through constant monthly installments (capital and interest), the first installment falling...
-
Use the inner product = 3abab 12+ a21b21+ a22b22 to find (A, B), where A = 11 11 12 and B = B = [214] 3
-
It costs a total of $2,000 to perform preventive maintenance (PM) on five identical production machines. This is the cost to perform preventive maintenance on all five of the machines.If one of the...
-
Briefly explain the key principles and practices of each of the following: Accrual accounting, including how its implementation affects budgeting and the monitoring of budget outcomes Double-entry...
-
Use the Gauss-Jordan method to solve the following system of equations. 3x 4y+4z = 4 3x+5yz=9 12x7y+11z = 21
-
24.24.Summer Ice Pty Ltd is a manufacturer of a range of ice cream products. Hate following is a list of activities, costs and quantitiesof activity drivers for a number of activities that occur in...
-
The motion of a stone thrown into a pond is described by r(t) = ((1.5-0.3e-13.6t) + (0.094e-13.6t - 0.094 -0.72t) ) m where t is time expressed in seconds, and t= 0.2 s is the time when the stone...
-
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?
-
Consider the following scenarios: To assist the sale of your products in a particular foreign market, it is suggested that you pay a 10 percent commission to a go-between who has access to high...
-
Are the ethics of gift-giving different between high context and low-context cultures?
-
Two consortia of leading North American and European apparel retailers, the Alliance for Bangladesh Worker Safety and the Accord on Fire and Building Safety in Bangladesh, have pledged to provide...
Study smarter with the SolutionInn App