C Programming - Declarations and Initializations - Discussion

Discussion Forum : Declarations and Initializations - General Questions (Q.No. 11)
11.
When we mention the prototype of a function?
Defining
Declaring
Prototyping
Calling
Answer: Option
Explanation:

A function prototype in C or C++ is a declaration of a function that omits the function body but does specify the function's name, argument types and return type.

While a function definition specifies what a function does, a function prototype can be thought of as specifying its interface.

Discussion:
46 comments Page 5 of 5.

Revathy said:   1 decade ago
int a;
is the declaration- it simply assigns the datatype for the variable

int a=10; is the definition- it assigns the value for the variable- the value given should match d datatype

Sundar said:   1 decade ago
Give me the definition for the declaring and the defining and also prototype.

Megha tavrech said:   1 decade ago
Prototype means just declaring the function, not providing body?

I think now it is understandable.

Amar said:   1 decade ago
Prototype means we specifies the interface of that declared function. And we will use that function for coherent task.

Srinu said:   1 decade ago
What is prototype?

Aditya said:   1 decade ago
If possible say what is "prototype" in explanation.


Post your comments here:

Your comments will be displayed after verification.