Help please they are all true or false 1) C++ always provide default constructor
ID: 3730702 • Letter: H
Question
Help please they are all true or false 1) C++ always provide default constructor if the class does not have one. 2) Base class knows everything about its derived class. 3) In derived class, "super" can be used to refer its base class 4) In C++, catch(..) is used to capture any type of exceptions thrown from the try block 5) C++ class friend function must be class member function 6) A class with at least one virtual function is called as abstract class 7) Abstract class can be used as a base class 8) The default access specifier for the class members is public 9) C++ operator A is used to calculate the value of one number raised to another 10) T& operator++(int) is valid declaration for overloading ++ in postfix form where T is the class namExplanation / Answer
Answer:
1. TRUE , On the off chance that you characterize a class with no constructor, the compiler will orchestrate a constructor for you (and that will be a default constructor - i.e., one that doesn't require any contentions). Assuming, be that as it may, you do characterize a constructor, (regardless of whether it takes at least one contentions) the compiler won't orchestrate a constructor for you - by then, you've assumed liability for developing objects of that class, so the compiler "ventures back", as it were, and leaves that activity to you.
2. FALSE , It can point to derived class but doesnt know everything of it
3. TRUE , A base class is a class, in an object-oriented programming dialect, from which different classes are inferred. It encourages the production of different classes that can reuse the code certainly inherited from the base class (with the exception of constructors and destructors). A software engineer can broaden base class functionality by adding or abrogating individuals applicable to the inferred class.
A base class may likewise be called parent class or superclass.
4. TRUE , Example :
Try
{
result = num/0;
}
Catch(Exception e)
{
Print(e.message);
}
When we face error in Try , we define that error in Catch that it is an error
DEAR ! DUE TO COMPANY NORMS , WE ARE SUPPOSED TO ANSWER ONLY 4 PARTS OF THE MULTIPLE PARTS QUESTION.
KINDLY POS SEPARATELY TO GET ANSWERED.
RATE IT IF HELPS ELSE LET ME KNOW YOUR DOUBT.
THANK YOU !!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.