Logo 
Search:

C++ Programming Articles

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

Program of declaration of default arguments during creation of function

Posted By: Noah Evans     Category: C++ Programming     Views: 5525

Write a program of declaration of default arguments during creation of function.

Code for Program of declaration of default arguments during creation of function in C++ Programming

#include<iostream.h>
#include<conio.h>
void f(int i=5,int j=10)
{
    cout<<"I = "<<i<<endl;
    cout<<"J = "<<j<<endl;
}

main()
{
    clrscr();
    int i=15,j=20;
    f();
    f(i);
    f(j);
    f(i,j);
}
  
Share: 



Noah Evans
Noah Evans author of Program of declaration of default arguments during creation of function is from London, United Kingdom.
 
View All Articles

Related Articles and Code:


 
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!