What are different types of functions in c language?
Answers
Answer:
4types of languages
Explanation:
Function with no arguments and no return value.
Function with no arguments and a return value.
Function with arguments and no return value.
Function with arguments and a return value
l hope this will help u mark me as brain list ❤
Answer:
Standard library functions
User-defined functions
Explanation:
There are two types of function in C language.
- Standard Library Functions
- User-defined Function
Let's see each function one by one.
- Standard Library Functions :
Standard Library functions are also know as per define functions. We don't have to write it's definition or we don't have to declare this type of functions. We only need is to #include standard header file into our C program and call Functions. Some well know functions are printf(), scanf() with are pre defined in <stdio.h> file.
Example :
#include <stdio.h>
void main()
{
printf("Well-come to printf function."); ...
}
Output:
Well-come to printf function.
here, Printf() is pre defined function.
2. User-defined functions :
Unlike stranded lib function, We need to write user defined function as per below syntax.
#include <stdio.h>
void functionName() // Function decralation
{
... .. ... // Function defination
... .. ...
}
int main()
{
... .. ...
... .. ...
functionName(); // Function call
... .. ...
... .. ...
}