Logo 
Search:

C++ Programming Articles

Submit Article
Home » Articles » C++ Programming » Homework HelpRSS Feeds

Program that provides an example of functions with default arguments

Posted By: Adalia Miller     Category: C++ Programming     Views: 8674

Write a program that provides an example of functions with default arguments.

Code for Program that provides an example of functions with default arguments in C++ Programming

#include<iostream.h>
#include<conio.h>
main()
{
    clrscr();
    void f(int=5,int=5);
    int i,j;
    f();
    i=10;
    j=20;
    f(i);
    f(i,j);
}

void f(int i,int j)
{
    cout<<"I= "<<i<<endl;
    cout<<"J= "<<j<<endl;
}
  
Share: 



Adalia Miller
Adalia Miller author of Program that provides an example of functions with default arguments is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!