1. C function with arguments (parameters) and with return value.
2. C function with arguments (parameters) and without return value.
3. C function without arguments (parameters) and without return value.
4. C function without arguments (parameters) and with return value.
C functions aspects syntax
function declaration:
int function ( int );
function call: function ( a );
function definition:
1. With arguments and with
int function( int a )
return values
{
statements;
return a;
}
function declaration:
void function ( int );
function call: function( a );
2. With arguments and without function definition:
return values void function( int a )
{
statements;
}
function declaration:
void function();
function call: function();
3. Without arguments and without function definition:
return values void function()
{
statements;
}
function declaration:
int function ( );
function call: function ( );
function definition:
4. Without arguments and with
int function( )
return values
{
statements;
return a;
}
2. C function with arguments (parameters) and without return value.
3. C function without arguments (parameters) and without return value.
4. C function without arguments (parameters) and with return value.
C functions aspects syntax
function declaration:
int function ( int );
function call: function ( a );
function definition:
1. With arguments and with
int function( int a )
return values
{
statements;
return a;
}
function declaration:
void function ( int );
function call: function( a );
2. With arguments and without function definition:
return values void function( int a )
{
statements;
}
function declaration:
void function();
function call: function();
3. Without arguments and without function definition:
return values void function()
{
statements;
}
function declaration:
int function ( );
function call: function ( );
function definition:
4. Without arguments and with
int function( )
return values
{
statements;
return a;
}