0
Pointers on functins
Hey guys, how can i use pointers with functions?
1 Antwort
+ 2
In the function prototype and function definition you can write int * in the parameters and in the int main you need to write address of operator that is & before the variable in the parentheses
Like this
int add(int *a,int *b)
{
return *a+*b;
}
int main()
{
//Some code
c=add(&a,&b);
//Some code
}