CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS LANGUAGES C DETAILS
Question :
Why should I prototype a function?
Category C Interview Questions
Rating (4.2) By 22 users
Added on 10/22/2004
Views 9966
Rate it!
Answers:

A function prototype tells the compiler what kind of arguments a function is looking to receive and what
kind of return value a function is going to give back. This approach helps the compiler ensure that calls to a function are made correctly and that no erroneous type conversions are taking place.



Prototype of the function tell compiler that we will use this function in our program and it will run even if we do not write code of function



 Posted by: MUHAMMAD AAMIR SAYEED    

Contact MUHAMMAD AAMIR SAYEED  Contact MUHAMMAD AAMIR SAYEED

prototype of function tells compiler about function behaviour it means due to prototype compiler knows for things
1.name of function:-it is the identifier which is used to call a function
2.type of function:-it tells which type of value function will return
3.no of argument:-it tells how many arguments are reuired to call a funtion
4.types of argument:-it tells types of arguments which are passed to a function



 Posted by: syed khursheed ahmed    

Contact syed khursheed ahmed  Contact syed khursheed ahmed

a function protype calls the compilerand which argument recive and retun the value to given program



 Posted by: aniket    

Contact aniket  Contact aniket

the user defined function which we are going to use,is not aware to compiler so first we have to tell the behaviour of function to compiler. when complier executes function protype code, then compiler knows that there is a function of this type used in the program.



 Posted by: Amol Patil    

Contact Amol Patil  Contact Amol Patil

prototype of the function tell the compiler to recieve and return what type of data from the function at time of compilation and easy to identify the function.



 Posted by: LAXMAN HONAWAD    

Contact LAXMAN HONAWAD  Contact LAXMAN HONAWAD


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
What is a static function?
View Answer
Is it possible to execute code even after the program exits the main() function?
View Answer
Is using exit() the same as using return?
View Answer
Can the sizeof operator be used to tell the size of an array passed to a function?
View Answer
Is it better to use a pointer to navigate an array of values,or is it better to use a subscripted array name?
View Answer
What is the difference between a string and an array?
View Answer
What is a modulus operator? What are the restrictions of a modulus operator?
View Answer
Why n++ executes faster than n+1?
View Answer
Write the equivalent expression for x%8?
View Answer
Which expression always return true? Which always return false?
View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL C Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/990/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.62