- Program :
#include <iostream>
#include <string>
using namespace std;
void myFunction(string country = "Norway") {
cout << country << "\n";
}
int main(){
cout <<"\n----------------FUNCTION PARAMETERS----------------\n";
cout <<"\n----------------Default Parameters----------------\n";
myFunction("Sweden");
myFunction("India");
myFunction();
myFunction("USA");
return 0;
}
- Output :
No comments:
Post a Comment