aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/scanf10.c
blob: 27a5e66a9e31fc619530efb040a8ac73ea2d3661 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include <string.h>

int
main (int argc, char *argv[])
{
  const char teststring[] = "<tag `word'>";
  int retc, a, b;

  retc = sscanf (teststring, "<%*s `%n%*s%n'>", &a, &b);

  printf ("retc=%d a=%d b=%d\n", retc, a, b);

  return retc == 2 && a == 6 && b == 12 ? 0 : 1;
}