Implicit return type of a class constructor is: (A) not of class type itself (B) class type itself (B) a destructor of class type (D) a destructor not of class type 

1 Answer

Answer :

(B) class type itself

Related questions

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 : 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 ……………. takes a reference to an object of the same class as itself as an argument. A) Reference constructor B) Copy Constructor C) Self Constructor

Last Answer : B) Copy Constructor

Description : Write a program to declare class having data member as hrs, mins, secs. Write constructor to assign values and destructor to destroy values. Accept & display data for one object.

Last Answer : #include<iostream.h> #include<conio.h> class time { private: int hrs, mins,sec; public: time(int h,int m,int s) { hrs=h; mins=m; sec=s; } ~time() { cout<< hours ... } }; void main() { time t(2,43,56); t.display(); getch(); }

Description : State True or False i) A destructor never takes any argument nor does it return any value. ii) It releases memory space for future use. A) True, True B) True, False C) False, True D) False, False

Last Answer : A) True, True

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 : Differentiate between constructor and destructor. 

Last Answer : Differentiate between constructor and destructor.

Description : Which of the following is true about Java. A) Java does not support overloading. B) Java has replaced the destructor function of C++ C) There are no header files in Java. D) All of the above.

Last Answer : D) All of the above

Description : Which of the following is not valid with reference to Message Passing Interface (MPI)? (A) MPI can run on any hardware platform (B) The programming model is a distributed memory model. (C) All ... implicit. (D) MPI - Comm - Size returns the total number of MPI processes in specified communication.

Last Answer : (C) All parallelism is implicit.

Description : Match the following types of variables with the corresponding programming languages: (a) Static variables (i) Local variables in Pascal (b) Stack dynamic (ii) All variables in APL (c) Explicit heap dynamic (iii) Fortran 77 (d) Implicit ... (ii) (C) (iii) (i) (iv) (ii) (D) (ii) (i) (iii) (iv)

Last Answer : (C) (iii) (i) (iv) (ii) 

Description : Is it possible to return an entire linked list object from a method in C++ without running the destructor?

Last Answer : Your description in the problem doesn't really describe what you want it to do that you would call right, nor does it explain how it uses its linked list. If you haven't figured out exactly what you want ... want to do that you can describe clearly, then yes, there will be a right way to do it.

Description : What is super constructor?

Last Answer : A: It is a constructor which is used to call the constructor of the super class and hence initialize the data members of the super class from within the sub class.

Description : What is the similarity between a method and a constructor?

Last Answer : A: Below are some of the similarities: 1) Both of them are member methods of any class. 2) Both can be parameterised or non-parameterised. 3) Both can be overloaded.

Description : What is a copy constructor?

Last Answer : A: It is a constructor which takes object as parameter and copies the value of the instance variable of that object to another object (creates a copy of an object).

Description : What is a constructor?

Last Answer : A: It is a member function with the same name as that of a class and is automatically called for initializing the variables of an object.

Description : Automatic initialization of object is carried out using a special member function called ………… A) Friend B) Casting C) Reference Parameter D) Constructor

Last Answer : D) Constructor

Description : A constructor that accepts no parameters is called the ………………. A) Paramless constructor B) No parameter constructor C) Default constructor D) Argumentless constructor

Last Answer : C) Default constructor

Description : he non-expenditure costs which arise when the producing firm itself owns and supplies certain factors of production are - (1) Explicit costs (2) Original costs (3) Implicit costs (4) Replacement costs

Last Answer : (3) Implicit costs Explanation: In economics, an implicit is the opportunity cost equal to what a firm must give up in order to use factors which it neither purchases nor hires. It is ... instead of renting, selling or lending it. These are costs a business incurs without actually spending money.

Description : The non-expenditure costs which arise when the producing firm itself owns and supplies certain factors of production are (1) Explicit costs (2) Original costs (3) Implicit costs (4) Replacement costs

Last Answer :  Implicit costs

Description : Using which keyword we can access value of the instance variables and class variables of that class inside the method of that class itself. A) super B) final C) this D) either super or this

Last Answer : C) this

Description : If a function is friend of a class, which one of the following is wrong ? (A) A function can only be declared a friend by a class itself. (B) Friend functions are not members of a class, they are ... are members of a class. (D) It can have access to all members of the class, even private ones.

Last Answer : (C) Friend functions are members of a class.

Description : Consider the following JAVA program: public class First { public static int CBSE (int x) { if (x < 100) x = CBSE (x +10); return (x - 1); } public static void main (String[] args){ System.out.print(First.CBSE(60)); } } What does this program print? (1) 59 (2) 95 (3) 69 (4) 99

Last Answer : (2) 95 

Description : What’s the implicit name of the parameter that gets passed into the set method/property of a class?

Last Answer : Value. The data type of the value parameter is defined by whatever data type the property is declared as.

Description : What’s the implicit name of the parameter that gets passed into the set method/property of a class?

Last Answer : Value. The data type of the value parameter is defined by whatever data type the property is declared as.

Description : What’s the implicit name of the parameter that gets passed into the class’ set method?

Last Answer : Value, and it’s datatype depends on whatever variable we’re changing. 

Description : ............... package is used by compiler itself. So it does not need to be imported for use. A) java.math B) java.awt C) java.applet D) java.lang

Last Answer : D) java.lang

Description : The dereferencing operator ……… is used when the object itself is used width in the member pointer. A) ->* B) .* C) Any of the above D) None of the above

Last Answer : B) .*

Description : In …………….., the virus places an identical copy of itself into other programs or into certain system areas on the disk. A) Dormant phase B) Propagation phase C) Triggering phase D) Execution phase

Last Answer : B) Propagation phase

Description : . …………………….. is a form of virus explicitly designed to hide itself from detection by antivirus software. A) Stealth virus B) Polymorphic Virus C) Parasitic Virus D) Macro Virus

Last Answer : A) Stealth virus

Description : A ………………… attaches itself to executable files and replicates, when the infected program is executed, by finding other executable files to infect. A) Stealth virus B) Polymorphic Virus C) Parasitic Virus

Last Answer : C) Parasitic Virus

Description : State whether true of false. i) A worm mails a copy of itself to other systems. ii) A worm executes a copy of itself on another system. A) True, False B) False, True C) True, True D) False, False

Last Answer : C) True, True

Description : Methods can be overloaded with a difference only in the type of the return value .. A) Not supported B) False C) True D) None of the above

Last Answer : B) False

Description : In C++, the keyword void was used ……….. A) To specify the return type of function when it is not returning any value. B) To indicate an empty argument list to a function. C) To declare the generic pointers. D) All of the above.

Last Answer : D) All of the above.

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 : Can a class have a static constructor?

Last Answer : Yes, a class can have a static constructor. Static constructors are called automatically, immediately before any static fields are accessed, and are generally used to initialize static class ... are referenced. Static constructors are called before instance constructors. An example is shown below.

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 : Write a C++ program to declare a class student with members as roll no, name and department. Declare a parameterized constructor with default value for department as ‘CO’ to initialize members of object. Initialize and display data for two students.

Last Answer : write a C plus plus program to declare a class which accept and display student information such as roll number division and percentage use get data and put data with required parameters

Description : Describe with examples, passing parameters to base class constructor and derived class constructor by creating object of derived class.

Last Answer : When a class is declared, a constructor can be declared inside the class to initialize data members. When a base class contains a constructor with one or more arguments then it is mandatory for the derived class to have a ... #include class base { int x; public: base(int a) { x=a; cout

Description : Write a C++ program to declare a class addition with data members as x and y. Initialize values of x and y with constructor. Calculate addition and display it using function ‘display’.

Last Answer : #include<iostream.h> #include<conio.h> class addition { int x,y; public: addition(int,int); void display(); }; addition::addition (int x1,int y1) { x=x1; y=y1; } void addition: ... y); } void main() { addition a(3,4); a.display(); getch(); }

Description : What is constructor? How user can declared constructor in derived class? Explain with example.

Last Answer : Constructor:- Constructor is a special member function which has same name as a class name and is used to initialize object during compile time of program. Declaring constructor in derived class If a base class contains a ... derived d(2,5); d.displaybase(); d.display(); getch(); }

Description : Write a program to declare class student having data members name and percentage. Write constructor to initialize these data members. Accept and display this data for one object.

Last Answer : #include<iostream.h> #include<conio.h> #include<string.h> class student { char name[20]; float per; public: student(char n[],float p) { strcpy(name,n); per=p; } ... { student S("Sachin",78.00); clrscr(); S.putdata(); getch(); }

Description : Explain the concept of overloaded constructor in a class with suitable example.

Last Answer : Overloaded constructor: When more than one constructor function is defined in a same class then it is called as overloaded constructor. All constructors are defined with the same name as ... first constructor does not accept any argument and the second constructor accepts two integer arguments.

Description : Explain constructor in derived class with suitable example.

Last Answer : When a class is declared, a constructor can be declared inside the class to initialize data members. When a base class contains a constructor with one or more arguments then it is ... one argument. Derived class constructor accepts two values and passes one value to base class constructor.

Description : Write a program in C++ to declare a class measure having data members as add 1, add 2, add 3. Initialize the values of two data members using constructor and display their addition using function.

Last Answer : #include<iostream.h> #include<conio.h> class measure { public: int add1,add2,add3; measure(int a,int b) { add1=a; add2=b; } void cal() { add3=add1+add2; } void display() ... ;>a>>b; measure m1(a, b); m1.cal(); m1.display(); getch(); }

Description : The end of your world is upon you, and you are the one to choose how it all goes down. Which form of the destructor do you choose?

Last Answer : I would choose instant painless death of all sentient creatures via things like rapid brain aneurysms, followed by the planet collapsing into a black hole. I’m not sure what the most gruesome way would be, but imposing this on everyone seems like a decent start.

Description : What is the difference between the destructor and the Finalize() method? When does the Finalize() method get called?

Last Answer : Finalize() corresponds to the .Net Framework and is part of the System.Object class. Destructors are C#'s implementation of the Finalize() method. The functionality of both Finalize() and the destructor is the same

Description : What is Destructor?

Last Answer : A destructor is just opposite to constructor. it has same as the class name, but with prefix ~ (tilde). They do not have return types

Description : What is a destructor?

Last Answer : A C# destuctor is not like a C++ destructor. It is actually an override for Finalize(). This is called when the garbage collector discovers that the object is unreachable. Finalize() is called before any memory is reclaimed.