This is a sample C++ program on function overloading. Using function overloading, this program can find area of figure like Cube, Sphere. #include <iostream.h> #include <conio.h> #include <math.h> void volume (int); void volume (float); void main() { int a, r,ch; cout<<" *********MENU********* "<<'\n'; cout<<" 1. Cube "<<'\n'; cout<<" 2. Sphere "<<'\n'; cout<<" Enter Choice: "; cin>>ch; if (ch==1) { cout<<" Enter Side: "; cin>>a; volume(a); } else if(ch==2) { cout<<" Enter Radius: "; ...
All HR and Technical interview questions with answers for freshers and experienced professional. It helps job seekers who are about to attend interviews.