Mon May 13 12:03:03 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[glibc/history.git] / stdio-common / scanf5.c
blobb52e853344af0500106306c5430f1b3423bc80ef
1 #include <stdio.h>
3 int
4 main()
6 int a, b;
8 a = b = -1;
9 sscanf ("12ab", "%dab%n", &a, &b);
10 printf ("%d, %d\n", a, b);
11 if (a != 12 || b != 4)
12 abort ();
14 a = b = -1;
15 sscanf ("12ab100", "%dab%n100", &a, &b);
16 printf ("%d, %d\n", a, b);
17 if (a != 12 || b != 4)
18 abort ();
19 return 0;