Wednesday 11 April 2018

How to call function in C/C++ ?

Function Call

Function call is a process of calling a function. It disturbs the normal flow of execution of a                program.

When a function is called the control moved to that function and after executing the instructions of the called function came back to main() function and execute the remaining instructions of the main().

Here is a complete example to understand the function declarationfunction definition and function call.

#include<conio.h>
            #include<iostream.h>

            void display();

            coid main(){
            clrscr();
            display();
getch();
}

void display()
{
cout<< ”Hello World” ;
}

No comments:

Post a Comment