#include <iostream>
using namespace std;
void myAge(string name, int age=18) // we set default value
{
cout <<name<<"age is "<<age<<endl;
}
int main() {
myAge("vikee") ;
myAge("vikas",16);
return 0;
}
// Output
// vikeeage is 18
// vikasage is 16
To embed this program on your website, copy the following code and paste it into your website's HTML: