Function in C Language

843 views
661 views

Published on

Function is a set of statement which is designed to perform some specific task. Function gives functionality to programmer to use one module(task) for more times rather then write same code again and again....

Published in: Education, Technology, Spiritual
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
843
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
43
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Function in C Language

  1. 1. • Function is a set of statement which is designed to perform some specific task. Function gives functionality to programmer to use one module(task) for more times rather then write same code again and again. By using Function we can divide the large program to many separate modules based on their functionality.
  2. 2. I ) Function Declaration : In this area we declare the prototype and number of argument required for function. Syntax : return_type function_name (argument1,argument2.....) eg : int div(int , int) { } 1 - int is a return type of function. 2 - div is a name for function. 3 - two int are arguments required to call the function.
  3. 3. II ) Function Definition : In this area we write the actual code of function required to perform desired task. Syntax : return_type function_name (list of argument with data types) { code of function ; return; }
  4. 4. III ) Function Calling : In this part we call the function and pass the argument for execution of function. Syntax : function_name (arguments...)
  5. 5. Four Types of Function : i ) With argument and return type. ii ) With argument and no return type. iii ) No argument and return type. iv ) No argument and no return type.
  6. 6. Learn more about that visit http://www.programmingsguru.com/ article/function-in-c-language-27
  7. 7. https://plus.google.com/u/0/106132290230951995384/posts https://www.facebook.com/programmings4you https://twitter.com/programingsguru

×