scanf()uses %cto read characters, so your code should be
scanf(" %c", &input);
By adding a space after your qualifier %c, you also consume any new line or space characters that might be added unintentionally, and then fixing the loop problem.
: , '\0'. s = malloc(max*sizeof(int) + 1);, '\0', stackPush(), :
void stackpush(char item){
s[N++] = item;
s[N] = '\0';
}
, stackPush s[N] = item;, s[N] += item;
C