answersLogoWhite

0

It allows the compiler to verify that the number and types of the functions parameters are correct when the function is actually called.

If the function were called with the wrong number or type of parameters, and no function prototype were supplied, the error would not be discovered until the program was actually run.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

When can a function prototype be omitted?

when we write definition of a function i.e; body of a function above main() function, then the function prototype be omitted. -Ramashankar Nayak,M.C.A,Pondicherry University


What errors do function prototype help prevent?

Syntax errors and prototype errors.


Is the main advantage of a prototype is users can work with the system before it is completed?

Essentially, yes. In computer programming terms, a prototype provides the compiler with a function's signature, making it possible for code to invoke that function even if the function definition hasn't yet been encountered by the compiler. In other words, it is not necessary to know what the function does in order to call it; the prototype provides all the information required to invoke the function. Outside of computing, a prototype is a working model of a system that developers can use to demonstrate the system's functionality and to work upon improvements to the design before going into full production.


How importance is a prototype in software engineering?

In Prototyping model instead of the end product a prototype is made. Advantage of prototype is that it helps in gathering and refining of requirements.


What is prototype in C language?

A prototype in C is the declaration of a function. Without a prototype, the function cannot be called because the compiler would have no way of knowing if the function was being called correctly. Prototypes may appear in multiple translation units but can only be defined once. A definition is itself a prototype.


What you declare in the function prototype in c?

yes


Can you write a program without specifying the prototype of any function?

You can write a program without specifying its prototype when the function returns an integer.If the prototype is not mentioned the compiler thinks that the return type of the function used is integer.When making program which return integer you can ignore writing the protoype.


Why you do not declare the function prototype?

Your question makes no sense.


Do declarations describe the data that will be used in the function?

Prototype of function describes return value as well as which data can be passed to the function.


What is the prototype of printf function?

in stdio.h:extern int printf (const char *fmt, ...);


What is the significance of using void in functions parameters lists?

It means that the function doesn't have parameters.example:int foo (void); -- it is a prototype for function 'foo', having no parametersint bar (); -- it is not a prototype as it says nothing about the parameters


What is a function prototype and how are they used?

A function prototype is the first line of a function which depicts its access specifier, modifier ,return type and name along with the number and type of arguments in it.. example: public static void zoom(int a,String b)