Update copyright notices with scripts/update-copyrights.
[glibc.git] / stdio-common / scanf7.c
blobc746e476668dcb26d9ad721461fec4780c8e6fac
1 #include <stdio.h>
2 #include <stdlib.h>
4 int
5 main (int argc, char *argv[])
7 long long int n;
8 int ret;
10 n = -1;
11 ret = sscanf ("1000", "%lld", &n);
12 printf ("%%lld: ret: %d, n: %Ld\n", ret, n);
13 if (ret != 1 || n != 1000L)
14 abort ();
16 n = -2;
17 ret = sscanf ("1000", "%llld", &n);
18 printf ("%%llld: ret: %d, n: %Ld\n", ret, n);
19 if (ret > 0 || n >= 0L)
20 abort ();
22 return 0;