WINSEM2021-22 BCSE102L TH VL2021220504672 2022-03-05 Reference-Material-I

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

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;
}

You might also like