could somebody please explain how this works (Dos based):
why is ch compared to 10 ?Code:int main( void) { int i ; char ch ; scanf("%d", &i); scanf("%c", &ch); if ( ch != 10) printf( "Error "); else printf (" %d ", i); }
....
this gives "error" when i input a character instead of an integer.