Wednesday

Function prototype


Function prototype

Syntax of function prototype

return_type function_name(type(1) argument(1),....,type(n) argument(n));

In the above example,int add(int a, int b); is a function prototype which provides following information to the compiler:

1.    name of the function is add()
2.    return type of the function is int.
3.    two arguments of type int are passed to function.

Function prototype are not needed if user-definition function is written before main() function.



Kindly Bookmark this Post using your favorite Bookmarking service:
Technorati Digg This Stumble Stumble Facebook Twitter
YOUR ADSENSE CODE GOES HERE

0 comments:

Post a Comment

Dont Forget for Commets

 

| C programing tutorials © 2009. All Rights Reserved | Template Style by My Blogger Tricks .com | Design by Brian Gardner | Back To Top |