Your printf() is wrong as well. Change to:
Code:
printf ("%d\n", *pn);
return c;
}
The reason it's wrong is that *pn contains the converted integer, not the variable 'c'. Read closely what the function returns:
Returns EOF for end of file, zero if the next input is not a number, and a positive value if the input contains a valid number
I'm assuming that's not really what you want to print.
Maybe remove the printf() from inside getint() and change Testing() to:
Code:
void Testing ()
{
/* Local variables and initialization. */
int x = 90;
if (getint (&x) > 0) {
printf("%d\n", x);
}
}