I\'m trying to use pass by reference in C so that the function can modify the values of the parameters passed to it. This is the function signature:
int loc
C has no reference variables but you can consider reference as const pointer to data so ,
Make const pointer to data like this so that pointer cant point to other data but data being pointed by it can be changed.
int locate (char *name, int * const s, int * const i)