Function [ takes nothing returns nothing ]

_________________________________________
Takes nothing returns nothing [ function ]
------------------------------------------------------------------

. when function cannot takes or returns any type of data that is called 
 takes nothing returns nothing means { void } 

. VOID = this keyword shows their has no data returns or takes 

------------------
run screen
------------------
$$$$$$$$$$$$$$

#include<stdio.h>

#include<conio.h>

void add(void);  // function declaration or prototype //
void main()
{
    clrscr();
    add(); // function call //
    getch();
}
void add() // function defenation //
{
int a,b,c;
printf("enter two number= ");
scanf("%d %d",&a,&b);
c=a+b;
printf("sum is [ %d ]",c);

}
     

#######################

All rights goes to $[UB codes]$

#######################

<--------------------------------------------->

Popular posts from this blog

[2D] ARRAY

Switch in C

2D [STRING] IN C