Virtual constructor: Constructors cannot be virtual. Declaring a constructor as a  virtual function is a syntax error. Does c++ support multilevel and multiple  inheritance?

1 Answer

Answer :

Yes.

Related questions

Description : Which of the following characteristics of constructor are true. i) They should be declared in the public section. ii) They are invoked automatically when the objects are created. iii) They do not have return type and void also. ... and v C) Only i, iii, iv and v D) All i, ii, iii, iv and v

Last Answer : D) All i, ii, iii, iv and v

Description : Does c++ support multilevel and multiple inheritance?

Last Answer : Yes.

Description : What is multiple inheritance? What is multilevel inheritance? What is difference between them?

Last Answer : Multiple Inheritance: When A derived class is derived from more than one base class then it is known as multiple inheritance. A derived class can inherit the attributes of all base classes ... , last derived class will inherit only public property of all class including intermediate class.

Description : What is multilevel inheritance? Draw the diagram to show multilevel inheritance. using classes with data member and member function. 

Last Answer : When a class is derived from another derived class then it is called as multilevel inheritance.

Description : If a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?

Last Answer : Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.

Description : If a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?

Last Answer : Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.

Description : If a base class has a bunch of overloaded constructors, and an inherited class has another bunch of overloaded constructors, can you enforce a call from an inherited constructor to an arbitrary base constructor? 

Last Answer : Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class. 

Description : C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write? 

Last Answer : Two. Once you write at least one constructor, C# cancels the freebie constructor, and now you have to write one yourself, even if there’s no implementation in it.

Description : Are constructors inherited? Can a subclass call the parent's class constructor? When?

Last Answer : Ans. You cannot inherit a constructor. That is, you cannot create a instance of a subclass using a constructor of one of it's superclasses. One of the main reasons is because ... developer the ability to override a superclasses constructor you would erode the encapsulation abilities of the language.

Description : What is virtual constructors/destructors?

Last Answer : Answer1 Virtual destructors: If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor ... base-class pointer to a derived-class object, the destructor for the appropriate class is called.

Description : Write a C++ program for following multilevel inheritance.   Accept and display data for one car with all details.   

Last Answer : #include<iostream.h> #include<conio.h> class Carmanufacturer  { char Name[10]; public: void getcarm() { cout<<"\nEnter Car Name "; cin>>Name; } void putcarm() ... getcar(); c.putcarm(); c.putcarmodel(); c.putcar(); getch();  }

Description : Which of the following is used to make an Abstract class ? (A) Making atleast one member function as pure virtual function (B) Making atleast one member function as virtual function (C) Declaring as Abstract class using virtual keyword (D) Declaring as Abstract class using static keyword

Last Answer : (A) Making atleast one member function as pure virtual function

Description : ______provides a powerful and natural mechanism for organizing and structuring your software. It also explains how classes inherit state and behavior from their super classes and explains how to derive one class ... the java programming language: a) Object b) Inheritance c) Class d) None of These

Last Answer : b) Inheritance

Description : Describe constructor with syntax and example.

Last Answer : A constructor is a special member function whose task is to initialize the objects of its class. It is special because its name is same as the class name. The constructor is invoked whenever an object of its associated class ... )//constructor declaration { a=0; } }; void main() { ABC x; }

Description : The compiler _ translate a program code with any syntax error: a. Can b. Cannot c. Without d. None of these

Last Answer : b. Cannot

Description : Is constructor or destructor inheritance explicit or implicit? What does this mean?

Last Answer : Constructor or destructor inheritance is explicit…. Public Extended : base() this is called the constructor initializer.

Description : Can a class or a struct have multiple constructors?

Last Answer : Yes, a class or a struct can have multiple constructors. Constructors in C# can be overloaded.

Description : Explain multiple constructors in a class with suitable example. 

Last Answer : Multiple constructors in a class means a class can contain more than one constructor. This is also known as constructor overloading. All constructors are defined with the same name as the class they belong to. All the ... default constructor integer(int a, int b) { m = a; n = b; cout

Description : What is syntax error?

Last Answer : Syntax errors are associated with mistakes in the use of a programming language. It maybe a command that was misspelled or a command that must was entered in lowercase mode but was instead entered with an ... symbol, or lack of symbol, somewhere within a line of code can also lead to syntax error.

Description : A ______ contains specific rules and words t hat express the logical steps of an algorithm a) Programming language b) Syntax error c) Programming structure d) Logic chart e) None of these

Last Answer : a) Programming language

Description : A mistake in an algorithm that causes incorrect results is called a a) logical error b) syntax error c) procedural error d) compiler error e) None of these

Last Answer : b) syntax error

Description : The errors that can be pointed out by the compiler are 1) Syntax error 2) Symantic error 3) Logical error 4) Internal error

Last Answer : 1) Syntax error

Description : Does C# support multiple-inheritance?

Last Answer : No. 

Description : Does C# support multiple-inheritance?

Last Answer : No.

Description : Does C# support multiple inheritance? 

Last Answer : No, use interfaces instead.

Description : Does Java support Multiple Inheritance ?

Last Answer : Ans. Interfaces does't facilitate inheritance and hence implementation of multiple interfaces doesn't make multiple inheritance. Java doesn't support multiple inheritance.

Description : Which of the following, in C++, is inherited in a derived class from base class ? (A) constructor (B) destructor (C) data members (D) virtual methods

Last Answer : (C) data members

Description : A decoder is required in case of a ______________ a) Vertical Microinstruction b) Horizontal Microinstruction c) Multilevel Microinstruction d) All types of microinstructions

Last Answer : Answer: a Explanation: There are two types of microinstructions: Horizontal and Vertical. In a horizontal microinstruction, each bit represents a signal to be activated whereas, in case ... of Computer Fundamentals Interview Questions and Answers for freshers focuses on The Decimal Number System

Description : The Simplest CPU – scheduling algorithm is ______. (1) SJF scheduling algorithm (2) Round robin scheduling algorith (3) Multilevel scheduling algorithm (4) FCFS scheduling algorithm

Last Answer : FCFS scheduling algorithm

Description : Describe multiple constructor by giving example.

Last Answer : Multiple constructor: Multiple constructors is a category of constructor in which a class can have more than one constructor. This is also known as constructor overloading. All constructors are defined with the same name as the class ... constructor 1 integer(int a, int b) { m = a; n = b; cout

Description : Which of the following is a receipt, declaring ownership of shares of a foreign company. which can be listed in India and traded in rupees? A. ADR B. GDR C. IDR D. EDR E. None of the Above

Last Answer : C. IDR Explanation: An IDR(Indian Depository Receipts)is a receipt, declaring ownership of shares of a foreign company. These receipts can be listed in India and traded in rupees.

Description : My calculator keeps saying syntax error over 10.2x10^12 why?

Last Answer : ok it works if I type in x10^12 but if I use the button x10^x it gives a syntax error.

Description : which type of errors are detected by the assembler: a. syntax error b. logical error 9 run time error a none of these

Last Answer : a. syntax error

Description : What type of errors are not detected by assemblers: a. Syntax error b. Runtime error c. Logical error

Last Answer : c. Logical error

Description : What is the output of the following code? a={1:"A",2:"B",3:"C"} print(a.get(5,4)) a) Error, invalid syntax b) A c) 5 d) 4

Last Answer : d) 4

Description : Suppose d = { john :40, peter :45}, what happens when we try to retrieve a value using the expression d[ susan ]? a) Since susan is not a value in the set, Python raises a KeyError ... Python raises a KeyError exception d) Since susan is not a key in the set, Python raises a syntax error

Last Answer : c) Since “susan” is not a key in the set, Python raises a KeyError exception

Description : Process of removing errors called a) Error Free b) Debug c) Syntax Error d) Exception

Last Answer : b) Debug

Description : What will be the output of the following Python code? nums = set([1,1,2,3,3,3,4,4])print(len(nums)) a) 7 b) Error, invalid syntax for formation of set c) 4 d) 8

Last Answer : Answer: c Explanation: A set doesn’t have duplicate items.

Description : What will be the output of the following segment of the program? main( ) { char *s = “hello world”; int i = 7; printf(“%, *s”, i, s); } (A) Syntax error (B) hello w (C) hello (D) o world

Last Answer : Answer: Marks given to all

Description : What is the output of the following program ? (Assume that the appropriate pre-processor directives are included and there is no syntax error) main() { char S[ ] = "ABCDEFGH"; printf ("%C",* (& ... Base address of S is 1000 */ } (A) ABCDEFGH1000 (B) CDEFGH1000 (C) DDEFGHH1000 (D) DEFGH1000

Last Answer : (D) DEFGH1000

Description : In C++, polymorphism requires: (A) Inheritance only (B) Virtual functions only (C) References only (D) Inheritance, Virtual functions and references

Last Answer : (D) Inheritance, Virtual functions and references 

Description : Cancellation of thread occurs only when it reaches a : (1) Cancellation point(2) Error point (3) Virtual point (4) Target point

Last Answer : Cancellation point

Description : Apart from the Central Level Planning, what are the other levels in the multilevel planning ? -Geography

Last Answer : 1. State-level planning. 2. District-level planning. 3. Block-level planning. 4. Panchayat level planning.

Description : What is the difference between numbered text and multilevel numbered text?

Last Answer : 1

Description : Starting a Multilevel Marketing Firm?

Last Answer : Starting a multilevel marketing firm is an excellent way to make residual income. Earn money even when you are not working, with a multilevel marketing firm. Millions of people have made money in this business, and the profits are endless. Start your own firm today and watch the money roll in.

Description : Benetton, a leading manufacturer of knitwear, expanded its operations to include retail outlets in the United States and Europe. This type of integration is called A)horizontal. B)vertical. C)multilevel. D)retail. E)merchandising.

Last Answer : B)vertical

Description : Goods or services reach the market place through ________. A. marketing channels. B. multilevel pyramids. C. monopolies. D. multiplication.

Last Answer : 1

Description : Study the pedigree chart given below. What does it show? (a) Inheritance of a condition like phenylketonuria as an autosomal recessive trait. (b) The pedigree chart is wrong as this is ... disease like haemophilia. (d) Inheritance of a sex-linked inborn error of metabolism like phenylketonuria

Last Answer : (a) Inheritance of a condition like phenylketonuria as an autosomal recessive trait.

Description : What is a COPY CONSTRUCTOR and when is it called?

Last Answer : copy constructor is a method that accepts an object of the same class and copies it s data members to the object on the left part of assignement: class Point2D{ int x; int y; public int ... MyPoint.color = 345; Point2D AnotherPoint = Point2D( MyPoint ); // now AnotherPoint has color = 345

Description : Define a constructor - What it is and how it might be called

Last Answer : constructor is a member function of the class, with the name of the function being the same as the class name. It also specifies how the object should be initialized. Ways of calling constructor ... memory on stack, the default constructor is implicitly called. Point2D * pPoint = new Point2D();