14.1 A Simple Function
Write a program that defines a function of type
void called
printMessage()
. The function outputs a simple message on the standard output. Call the user-defined function from the
main function:
void printMessage()
{
printf("Hello World! from a function.\n");
}
int main(void)
{
printMessage();
}
Output:Hello World! from a function.
14.2 Function Declaration and Definition
Write a program that both declares and defines a function of type void called printMessage(). The function outputs a simple message on the standard output. Call the user-defined ...