answersLogoWhite

0


Best Answer

storage_class

return_type

name

parameter-list

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What should you declare in a function prototype?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What you declare in the function prototype in c?

yes


Why you do not declare the function prototype?

Your question makes no sense.


How do you declare a string in a function prototype?

example: size_t strlen (const char *s);


On compilation a program throws an error saying a 'function should have prototype' what is wrong with the program?

One or more functions don't have a prototype. These functions should be either: - made static - have a prototype somewhere in a header (which is included into the same file)


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.


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.


When is a function executed and where should a function prototype and function definition appear in a source program?

If you want to use prototype it has to be declared before main(). If you have a function of type double with one argument of type int (with name arg), and the function name is func, then we have:#include ...double func(int arg);...int main(...){...return 0;}...double func(int arg){...}


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.


How do declare function pointer having two integer parameters and returning integer pointers?

// declare a function int* function(int, int); or int* (function)(int, int); // declare a pointer to a function int* (*pointer_to_function)(int, int);


How can you declare a pointer function?

*function();this declares a pointer function!


Can you declare a function in the body of another function in c language?

yes, we can not declare a function in the body of another function. but if we declare a function in the body of another function then we can call that very function only in that particular function in which it is declared; and that declared function is not known to other functions present in your programme. So if a function is required in almost all functions of your programme so you must declare it outside the main function i.e in the beginning of your programme.