Download presentation
Presentation is loading. Please wait.
1
FUNCTION
2
Same task in repetition
What is FUNCTION ? It is self contain block of statement that perform Same task in repetition
3
Collection of Function creates a
C FUNCTION contains set of instructions enclosed by “{ }” which perform specific operation in c program. C Program Function Collection of Function creates a C Program
4
Uses :- FUNCTION Avoid rewriting same logic/code again & again
No limit in calling function to make use of it We can call functions any no. of times & from any place in a program Dividing a big task into small pieces Function have re-usability FUNCTION
5
Function Declaration :-
Return_type function_name(argument list); This informs complier about Function name , Function parameters and return value’s data type
6
This call the actual function
Function call :- Function_name (argument list); This call the actual function
9
Output
10
Types of FUNCTION FUNCTION Library Function User Defined Function
11
How to call FUNCTION in a program ?
Call by value Call by reference
12
All FUNCTION can be called either with arguments or without arguments in c program . And also these Function may or may not return value to the calling function.
13
FUNCTION with no argument & no return value
FUNCTION with argument & no return value FUNCTION with argument & with return value
14
FUNCTION with no argument & no return value
16
Output
17
FUNCTION with argument & no return value
19
Output
20
FUNCTION with argument & with return value
22
Output
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.