Q: To decompose the lengthy program into various segments (modules) each of which perform a specific task? Such segments are termed as functions in C++ language. Could you expand this statement further?
The function is one of the most valuable concepts in C++ today. Parts allow us to take large, complicated programs and to split them into smaller, manageable pieces. There are two categories of functions. The first category is program control; subdivide and control the agenda. The second category is specific tasks, which perform particular tasks and is useable in several programs because the other programs also need to do specific tasks.
Depending on the specific programming language, there is a common way to call a function, define a function and declare a function.
void pause(void)
{
cout << "\n\n";
system("PAUSE");
cout << "\n\n";
return;
}
Comments
Leave a comment