/* File: scanf5.c Test use of the scanf() function to read in user input. scanf() actually returns a value. It is the number of items matched. */ #include int main() { int n ; n = 42 ; printf ("Type 'foo' followed by an integer: ") ; scanf("foo%d", &n) ; printf ("The number you entered is: %d\n", n) ; return 0 ; }