Which corrects the logic error in the following program?
void FindPrevNext (int x, int prev, int next) {
prev = x - 1;
next = x + 1;
}
int main(void) {
int x = 10;
int y;
int z;
FindPrevNext (x, y, z);
printf("Previous = %d, Next = %d", y, z);
return 0;
}
a.The variables prev and next should be passed by reference
b.The variables y and z should be initialized to 0
c.The function FindPrevNext() should have a return statement for variables prev and next
d.prev and next should be initialized in FindPrevNext()