Explain the difference between a function prototype and a function definition.
What will be an ideal response?
A function prototype tells the compiler the name of a function and the type of data returned by the function. A prototype also describes any additional data required by the function to perform its task (i.e., the function’s parameters). A prototype does not contain code to make the function perform the task—it merely "outlines" the function so that the compiler can verify that programs call the function correctly. A function definition contains the actual code that executes to perform the function’s specified task when the function is called. Parameter names are optional in the function prototype.
You might also like to view...
William wants to create a dialog box in his website to display the message "My name is William". Which of the following syntaxes must William use to display the message?
A. alert("My name is William") B. confirm("My name is William") C. prompt("My name is William") D. print("My name is William")
Blocking a signal means to
A. delay receipt of the signal until later B. wait until that signal arrives