answersLogoWhite

0


Best Answer

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

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: When can a function prototype be omitted?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What errors do function prototype help prevent?

Syntax errors and prototype errors.


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.


Why you do not declare the function prototype?

Your question makes no sense.


Function prototype in c?

Yes. Examples can be found in stdio.h


What is difference function prototype and function define in turbo c?

In C, a function prototype is a declaration to the compiler that a certain function exists, without a full definition. This allows other functions to call that function. The linker will later make sure that a function definition actually exists (perhaps somewhere else), and will turn the call to the function to a call to the correct function.

Related questions

What errors do function prototype help prevent?

Syntax errors and prototype errors.


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 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)


Function prototype in c?

Yes. Examples can be found in stdio.h


What is difference function prototype and function define in turbo c?

In C, a function prototype is a declaration to the compiler that a certain function exists, without a full definition. This allows other functions to call that function. The linker will later make sure that a function definition actually exists (perhaps somewhere else), and will turn the call to the function to a call to the correct function.


What should you declare in a function prototype?

storage_class return_type name parameter-list


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.