Is there actually array function in C? I actually wanted to return several integer value at one time. The code below is not valid obviously but it's just what I'm thinking about. Is there any other method to achieve this?
int marks[5] = {90, 90, 70 ,50, 40};
int search = 90;
int linearSearch(){
int result[5];
int index = 0;
for(int i = 0; i < 5; i++){
if(marks[i] == search){
result[index] = i;
index++;
}
}
return result;
}