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?
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 1 of 5.
Sandipgatkal said:
8 years ago
@Vikas.
defining and initializing
int a=20;
defining without initialization :
int a;
initializing already defined variable a
a=20;
defining and initializing
int a=20;
defining without initialization :
int a;
initializing already defined variable a
a=20;
(1)
Vikas said:
8 years ago
What is the difference between initializing and defining?
(1)
Vignesh said:
8 years ago
Prototype means: Gives a function name and args types.
For eg:sum funcall (10, 20), where funcall is an prototype means function name. Where does omit about the interior body of that function.
For eg:sum funcall (10, 20), where funcall is an prototype means function name. Where does omit about the interior body of that function.
(1)
Sam said:
10 years ago
How we says that prototyping is the declaring?
(1)
Karthik said:
1 decade ago
Can you people explain the difference between old compiler and new compiler?
Shanker said:
1 decade ago
Definition of prototype means declaration of function. It's tell the compiler -this type of function are used in a program.
Ashutosh said:
1 decade ago
Prototype means declaration of function which is specially use in the program.
AmolKotwal said:
1 decade ago
Is initialization and Definition of varible same?
Vineeth said:
1 decade ago
Initialization means declaration and assignment, like int a=10;
Definition means just like ... int a; here memory space is allocated by the OS at the run time , and if initialization means that value goes to the reserved memory.
Then you may have a doubt what is declaration? Isn't the statement int a; is the declaration itself? Answer is NO, int a;is defenition, int a=10; is initialization ..and the declaration is like extern int a;
Here what happens is no memory space is allocated for 'a', Its simply telling the compiler that variable 'a' is a type of 'int' and you should define it if you want to use it.. like int a; again...
Definition means just like ... int a; here memory space is allocated by the OS at the run time , and if initialization means that value goes to the reserved memory.
Then you may have a doubt what is declaration? Isn't the statement int a; is the declaration itself? Answer is NO, int a;is defenition, int a=10; is initialization ..and the declaration is like extern int a;
Here what happens is no memory space is allocated for 'a', Its simply telling the compiler that variable 'a' is a type of 'int' and you should define it if you want to use it.. like int a; again...
Brijesh Nishad said:
1 decade ago
What is the actually function prototype?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers