In the code below, I'm asked what the function fo(int c[], int d[]) will do. The function below has 3 arguments however, so I'm unsure if it's a typo.
If it is not a typo, am I correct in saying it will not compile since it has only two arguments?
If it is a typo, am I correct in saying the function below will put the array c and reverse it into d? i.e. if c=1 2 3 4 5, d=5,4,3,2,1 after the function call.
1 2 3 4 5
void fo(int c[], int d[], int e){
for(int i=0;i<e;i++){
d[e-1-i]=c[i];
}
}
The question asks what does the function fo(int c[], int d[]) do(I assume not having int e is a typo), so couldn't I say it puts the reverse of the array C into array D? Should I also say, assuming c and d are equal, and e is >0?