StudyLover
  • Home
  • Study Zone
  • Profiles
  • Contact us
  • Sign in
StudyLover 30. Program to implement function overloading.
Download
  1. C++ Programs list
29. Program to implement multiple inheritance.
C++ Programs list

1.      Program to implement function overloading.

  1. #include <iostream.h>

  2. #include<conio.h>

  3. void print(int x) {

  4.     cout << "Integer: " << x << endl;

  5. }

  6.  

  7. void print(double x) {

  8.     cout << "Double: " << x << endl;

  9. }

  10.  

  11. void print(char *x) {

  12.     cout << "String: " << x << endl;

  13. }

  14.  

  15. int main() {

  16.     int a = 10;

  17.     double b = 3.14;

  18.     char str[] = "Hello";

  19.  

  20.     print(a);

  21.     print(b);

  22.     print(str);

  23.     getch();

  24.     return 0;

  25. }

29. Program to implement multiple inheritance.
Our Products & Services
  • Home
Connect with us
  • Contact us
  • +91 82955 87844
  • Rk6yadav@gmail.com

StudyLover - About us

The Best knowledge for Best people.

Copyright © StudyLover
Powered by Odoo - Create a free website