Functions
#include <stdafx.h>
#include <iostream>
#include <string>
using namespace std;
/* A function is a block of statements that together perform a particular task. */
void display(string name) /* This is the function definition.Return type is void,Function name is display,Type of formal argument is string. */
{
cout<< name << endl;
}
int main()
{
display("ABC"); /* This is the function calling statement. ABC is actual argument passed to the function. */
return 0;
}
Output:
ABC