23D21A0413&457 - PPS - Assignment 1
23D21A0413&457 - PPS - Assignment 1
INTRODUCTION :
A function in C is a set of statements that when called
perform some specific task. It is the basic building block
of a C program that provides modularity and code
reusability, having certain meanings and performing
certain operations.
Syntax for a function:
Return-type function-name (Argument)
Here, the return-type specifies the data type of the value that the
function will return.
FUNCTION ASPECTS:
The aspects of function can be divided into 3 aspects:
1.Function Declaration
2.Function Definition
3.Function Calls
1. Function Declarations
In a function declaration, we must provide the function
name, its return type, and the number and type of
its arguments. A function declaration tells the compiler
that there is a function with the given name defined
somewhere else in the program.
int myFunction()
int main()
{
printf(“Hi I’m in main”)
{
printf("JESSIE")
;
}
TYPES OF FUNCTIONS in C