Simple Example Program for Function In C++


A function is a group of code or code block, which performs a specific task

We have some terminology to refer to functions:

  • A function's inputs are known as its arguments
  • A function that gives some kind of answer back to the main function.

For Better Understanding,


return_type function_name(argumnent)
 // body Of the Function

Simple Example Program for Function

/*  Example Program For Simple Example Program Of Function In C++
    little drops @

    Coded By: THIYAGARAAJ MP             */


using namespace std;

// Simple Function printmessage()
void printmessage() {
    cout << "Im Function In C++";

int main() {
    //Call Simple Function printmessage()
    return 0;

Sample Output

Im Function In C++