What and all can a compiler provides by default?
Answers were Sorted based on User's Feedback
Answer / shakti singh khinchi
5 things:
1: default constructor.
2: default destructor.
3: default copy constructor.
4: assignment operator (=).
5: address operator ('&').
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / dee
default constructor, destructor, default copy constructor,
assignment operator.
| Is This Answer Correct ? | 13 Yes | 0 No |
Answer / sandy
Also operator "&"
class Test {};
int main()
{
Test t;
Test *ptr = &t;
return 0;
}
| Is This Answer Correct ? | 4 Yes | 5 No |
What is the difference between a constructor and a destructor in C++?
What are static and dynamic type checking?
Explain one method to process an entire string as one unit?
Difference between const char* p and char const* p?
Shall we use 'free' to free memory assigned by new, What are the further consequences??
Will the following program execute?
Badboy is defined who has ALL the following properties: 1. Does not have a girlfriend and is not married. 2. He is not more than 23 years old. 3. The middle name should be "Singh" 4. The last name should have more than 4 characters. 5. The character 'a' should appear in the last name at least two times. 6. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers
Differentiate between realloc() and free().
What are features of c++?
What is a syntax in c++?
What are the types of STL containers?
What is c++ mutable?