Back to index

glibc  2.9
scanf10.c
Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <string.h>
00003 
00004 int
00005 main (int argc, char *argv[])
00006 {
00007   const char teststring[] = "<tag `word'>";
00008   int retc, a, b;
00009 
00010   retc = sscanf (teststring, "<%*s `%n%*s%n'>", &a, &b);
00011 
00012   printf ("retc=%d a=%d b=%d\n", retc, a, b);
00013 
00014   return retc == -1 && a == 6 && b == 12 ? 0 : 1;
00015 }