C++ program to find the volume of a cube, cylinder, and sphere by function overloading

C++ program to find the volume of a cube, cylinder, and sphere by function overloading.

Output C++ program to find the volume of a sphere

     

C++ Program to convert a decimal number into binary by inline function

Write a program in C++ to convert a decimal number into binary without using an array and with inline function. The inline function inline T4Tutorials_Decimal_Number(int n) helps to increase the execution time of a program. The programmer can make a request to the compiler to make the inline function as inline T4Tutorials_Decimal_Number(int n). Making inline means that compiler … Read more

C++ Program to convert a decimal number into binary with friend function

Write a program in C++ to convert a decimal number into binary without using an array with a friend function. If we declare a function friend int show(T4Tutorials_Decimal_Number);  as a friend in a class T4Tutorials_Decimal_Number then this function friend int show(T4Tutorials_Decimal_Number);  can access the private and protected members of the class T4Tutorials_Decimal_Number. You must know that a global function can … Read more

C++ Program to convert a decimal number into binary with constructor and destructor

Write a program in C++ to convert a decimal number into binary without using an array and using the constructor and destructor. Constructor

Output Please enter Decimal number: 8 binary number = 1000 Destructor

Output Please enter Decimal number: 4 binary number = 100

C++ Program to convert a decimal number into binary with constructor overloading.

Write a program in C++ to convert a decimal number into binary without using an array by using the constructor overloading.

Output Enter 1 FOR Single parameter Constructor. Enter 1 FOR Single parameter Constructor. 2 You Have Selected Single Parameter Constructor. Enter First Decimal no. to convert into BINARY no: 4 Enter Second Decimal … Read more

Write a c++ program to find out the sum of an A.P. series by using the inline function.

Write a c++ program to find out the sum of an A.P. series by using the inline function. The inline function inline T4Tutorials_AP_Series::T4Tutorials_AP_Series_Function() helps to increase the execution time of a program. The programmer can make a request to the compiler to make the inline function as inline T4Tutorials_AP_Series::T4Tutorials_AP_Series_Function(). Making inline means that compiler can … Read more

Write a c++ program to find out the sum of an A.P. series using constructor and destructor.

Write a c++ program to find out the sum of an A.P. series using constructor and destructor. Constructor The constructor T4Tutorials_AP_Series() is a member function of the class T4Tutorials_AP_Series. The constructor T4Tutorials_AP_Series()has the same name as the name of its class T4Tutorials_AP_Series. When a new object T4Tutorials_AP_Series a; of the class T4Tutorials_AP_Seriesis executed, the constructor T4Tutorials_AP_Series() also … Read more

Write a c++ program to find out the sum of an A.P. series by using the constructor overloadin.

Write a c++ program to find out the sum of an A.P. series by using the constructor overloading. The concept of using more than one constructor with the same name is called constructor overloading. In this program, the constructor must obey one or both of the following rules. All constructors with the same name and … Read more

Write a c++ program to find out the sum of an A.P. series by using the friend function.

Write a c++ program to find out the sum of an A.P. series by using the friend function. If we declare a function friend int show(T4Tutorials_AP_Series); as a friend in a class T4Tutorials_AP_Series then this function int show(T4Tutorials_AP_Series);  can access the private and protected members of the class T4Tutorials_AP_Series. You must know that a global function … Read more

Write a program in C++ to print Floyd’s Triangle by using the inline function.

Write a program in C++ to print Floyd’s Triangle by using the inline function. The inline function inline T4Tutorials_Pattern_Function() helps to increase the execution time of a program. The programmer can make a request to the compiler to make the inline function as inlineinline T4Tutorials_Pattern_Function(). Making inline means that compiler can replace the function definitions … Read more

Write a program in C++ to print Floyd’s Triangle by using the friend function.

Write a program in C++ to print Floyd’s Triangle by using the friend function. If we declare a function friend int show(T4Tutorials_Floyds_Triangle);as a friend in a class T4Tutorials_Floyds_Trianglethen this function int show (T4Tutorials_Floyds_Triangle a)can access the private and protected members of the class T4Tutorials_Floyds_Triangle. You must know that a global function can also be declared … Read more

Write a program in C++ to print Floyd’s Triangle by using the constructor destructor.

Write a program in C++ to print Floyd’s Triangle by using the constructor destructor. Constructor The constructor T4Tutorials_Floyds_Triangle() is a member function of the class T4Tutorials_Floyds_Triangle. The constructor T4Tutorials_Floyds_Triangle() has the same name as the name of its class T4Tutorails_Series. When a new object T4Tutorials_Floyds_Triangle object; of the class T4Tutorials_Floyds_Triangle is executed, the constructor T4Tutorials_Floyds_Triangle() also executed automatically. The constructor … Read more