C Programming
C Programming
Amrit Dangi
Binayak Sijapati
Sushant Khadka
CONTENTS
• Introduction to Function 1
• Library Function 2
• User define Function 3
• Types of Functions(4-types) 4-8
• Conclusion 9
INTRODUCTION
1
LIBRARY FUNCTION
2
USER DEFINED FUNCTIONS
4
1.No Argument and No Return
• The function does not return any value (void is used as the return type).
Syntax
void functionName() {
// Function code
}
5
2.No Argument and a Return Value
Syntax
returnType functionName() {
// Code
return value;
}
6
3.Argument and No Return Value
Syntax
void functionName(dataType param1, dataType param2, ...) {
// Function body (performs an operation)
}
7
4. Argument and a Return Value
• The function processes the inputs and returns a result using return.
Syntax
returnType functionName(dataType param1, dataType param2, ...) {
// Function logic
return value;
}
8
CONCLUSION
9
QUESTIONS/QUERIES…
10