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.

Computer Science & Information Technology

You might also like to view...

The size of an inode table determines

A. the maximum size of a file in the file system B. the maximum number of files in the file system

Computer Science & Information Technology

You can create different footers for add and even pages in a document

Indicate whether the statement is true or false

Computer Science & Information Technology

Describe secondary storage. Compare and contrast hard disks and solid-state storage.

What will be an ideal response?

Computer Science & Information Technology

What are some of the advantages of creating an enumeration type?

What will be an ideal response?

Computer Science & Information Technology