+ 1
how can i write an user defined function??
4 Antworten
+ 4
ex :
void add(int a, int b)
{
c=a+b; /* variable c has to be defined previously in the main function*/
printf(c);
}
+ 4
example function to swap two integer numbers:
void swap(int &x, int &y)
{
x = x+y;
y = x - y;
x = x - y;
}
+ 1
return_type function_name(parameters)
{
instructions....
..}
0
thanks guys