O5n is always smaller than On2 for any value of n 0 True Fa
O(5n) is always smaller than O(n^2) for any value of n > 0 True False Write a C++ program segment as an example, to demonstrate how a constructor function is defined and how it is used from the main program. The concept of function overloading is also known as polymorphism. True False
Solution
class Sample
{
int a;
public:
Sample(int x)
{
a=x;
}
};
int main()
{
int a=5;
Sample obj(a);
return 0;
}
