Answer includes multiple scenarios, when copy constructor is called in C++ programs. The copy constructor of a class in C++ is invoked on following scenarios
Answer: A virtual method in C# language is method that have virtual keyword in its declaration. In c# inheritance feature, we may want to allow
If we make the constructor private of a class in C# programming then we cannot create an object of the class out side of it
Answer: Both ref and out parameter or keywords in C# are used to pass an argument as a reference to a method in C# program.
Answer: No, methods with ref and out parameters in C# with same number of arguments can’t be overloaded. For example, in below class we’ll get
Sealed class cannot be inherited and sealed method in C# programming cannot be overridden. If we need to stop a method to be overridden or
Answer: No, in any class if we have sealed method it does not mean that the class is sealed. This rule is only apply to
Let’s understand the real-time example and use of sealed class and method in C# programming with real estate Apartments and Flat design with C# source
C++ program to swap two numbers using pointers and references and functions. Swapping two number using pointers concept is applicable to both C and C++.
Before listing the difference between pointer and reference in C++ , lets see the definition of pointer and reference. Pointer: A pointer is a simply