4. Which type of function among the following shows polymorphism? [1] a) Inline function b) Virtual...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
4. Which type of function among the following shows polymorphism? [1] a) Inline function b) Virtual function c) Undefined functions d) Class member functions 5. What is output of the following program? [2] class student { public int marks; void disp()) { cout<<"its base class" class topper:public student { public : void disp()) { } cout<<"Its derived class"; } void main() { student s; topper t; s.disp(); t.disp(); } a) Its base classIts derived class b) Its base class Its derived class c) Its derived classIts base class d) Its derived class Its base class 4. Which type of function among the following shows polymorphism? [1] a) Inline function b) Virtual function c) Undefined functions d) Class member functions 5. What is output of the following program? [2] class student { public int marks; void disp()) { cout<<"its base class" class topper:public student { public : void disp()) { } cout<<"Its derived class"; } void main() { student s; topper t; s.disp(); t.disp(); } a) Its base classIts derived class b) Its base class Its derived class c) Its derived classIts base class d) Its derived class Its base class
Expert Answer:
Answer rating: 100% (QA)
Answer Answer b Virtual Function Explanation Only vi... View the full answer
Related Book For
Discrete Mathematics and Its Applications
ISBN: 978-0073383095
7th edition
Authors: Kenneth H. Rosen
Posted Date:
Students also viewed these electrical engineering questions
-
The figure shows two circles C and D of radius 1 that touch at P.T is a common tangent line; C1 is the circle that touches C, D, and T; C2 is the circle that touches C, D, and C1; C3 is the circle...
-
Which type of team - self-managing, cross-functional, global, or virtual - do you think is the most difficult to manage, and why?
-
A student has a class that is supposed to end at 9:00 a.m. and another that is supposed to begin at 9:10 a.m. Suppose the actual ending time of the 9 a.m. class is a normally distributed rv X1 with...
-
Write a program that takes an integer command-line argument n and prints all the positive powers of 2 less than or equal to n. Make sure that your program works properly for all values of n.
-
The audit team will choose to reduce the reliance on controls if the _____ is greater than the _____ a. Tolerable rate of deviation; upper limit rate of deviation. b. Upper limit rate of deviation;...
-
Consider the parallel planes of infinite extent normal to the page having opposite edges aligned as shown in the sketch. (a) Using appropriate view factor relations and the results for opposing...
-
On June 8, 2017, Eugene Weiner made a post on Isaac Aflalos Facebook page. The post read, Yurim and Isaac took advantage of a old 94plus sick man elder abuse [sic]. Alflalo took umbrage to the post...
-
Doug Casey is in charge of planning and coordinating next springs sales management training program for his company. Doug listed the following activity information for this project: a. Draw a project...
-
What does a Revenue Rulling do? Clarity and explain various provisions of the Code, in the opinion of the Treasury O Modify or reverse an IRS decision O Provide guidance of internal management...
-
Change Purse Inc. is a small business that is planned to be located in a small Nova Scotia town. The town was incorporated in 1889 and, like many communities in Nova Scotia, it prides itself on being...
-
On January 1, 2018, BoomTown Industries issued $1,250,000 of 7% bonds, due in 15 years, with interest payable semi-annually on June 30 and December 31 each year. The market rate of interest was 9% at...
-
On January 1, Y3; Belmont Inc sold some merchandise to London Inc for $900,000 London has poor credit and signed a two-year, zero-interest bearing note. The market rate is 8% REQUIRED: Prepare ALL...
-
Differentiate the 3 listed below ( in no less than 100 words) Customer Value (CV) - is defined as how much a product or service is worth to a customer. Customer Lifetime Value (CLV) - It refers to...
-
On the Tokyo Stock Exchange, Honda Motor Company's stock closed at 2,707 per share on Monday, June 4, 2016. Honda trades as an ADR on the NYSE. One underlying Honda share equals one ADR. On June 4,...
-
VEE Ltd is a prominent manufacturer of eco-friendly personal mobility devices, which include the "Green-Cruiser" Scooters (GCS). The company operates with a decentralised structure comprising three...
-
Specifically, you must address the following rubric criteria: Describe the focus of IT auditing and business auditing. Include the following in your response: Examples of risks that IT auditors...
-
Consider the following summarised balance-sheet and the associated average interest rates of a bank. The bank holds coupon bonds that have a 3-year maturity with an 8% coupon rate. Assets Cash Coupon...
-
Transform the while loop from the previous exercise into an equivalent for loop (make sure it produces the same output).
-
a) State the definition of the fact that f (n) is O(g(n)), where f (n) and g(n) are functions from the set of positive integers to the set of real numbers. b) Use the definition of the fact that f...
-
Solve the system of congruences in Exercise 20 using the method of back substitution.
-
A says "I am the knight," B says "I am the knight," and C says "I am the knight."
-
A professional baseball team set its sights on winning the World Series. The team owner wanted to win big and win fast. Consequently, the team sank all of its resources into trading for the best...
-
Immediately following World War II, the quality of products produced by Japanese companies was not good enough to compete in the international marketplace. The only advantage Japanese companies had...
-
The Office of Technology Assessment (OTA) reports that only 11 to 15 percent of all machine tools in the U.S. are automated; the majority of those automated are found in large companies. A Census...
Study smarter with the SolutionInn App