/* File: scanf5.c This program shows the return values given by scanf. */ /* Include only the standard library */ #include main() { int n, rv ; double x ; printf("Enter an integer and a double: ") ; rv = scanf("%d%lf", &n, &x) ; printf("n = %d, x = %g, rv = %d\n", n, x, rv) ; } -------------------------------------------------- lassie% cc scanf5.c lassie% lassie% a.out Enter an integer and a double: 12 13.2 n = 12, x = 13.2, rv = 2 lassie% lassie% a.out Enter an integer and a double: 13.215 n = 13, x = 0.215, rv = 2 lassie%