- Syntax :
void functionName(parameter1, parameter2, parameter3)
{
// code to be executed }
- Program :
#include <iostream>
using namespace std;
void myFunction(string name) {
cout << name << " Venkat\n";
}
int main(){
cout <<"\n----------------FUNCTION PARAMETERS----------------\n";
cout <<"\n----------------Parameters and Arguments----------------\n";
myFunction("Monisha");
myFunction("Janani");
myFunction("Ramya");
return 0;
}
- Output :
No comments:
Post a Comment