int input(char s1[], char &ch, int &state, int pos)
Here &state means address of state, and you are passing value of state here :
input(s1,ch,state,pos);
There is no need to pass address of state since you are returning state.
If you want to pass by reference then you will have to pass address when you call a function ..ex . someFunction(&a) and in the definition you will catch it in a pointer like say,
void someFunction(int *p)
{
//and you will access its value here using *p which means value at address contained in poiter p
}
See which one suits your needs, n modify your code accordingly.
Also next time when you post a code use code tags