#include <stdio.h>

void main(void)
{
	char buf[100];
	short a;
	int b,d,n,i;
	char c;
  i = SSCANF("  20 -40 50a","%d %hd %n %d",&b,&a,&n,&d);
	printf("%d %d %d %d %d\n",i,n,b,a,d);
  i = SSCANF("   a    bc"," %c %c",&buf[0],&buf[1]);
	printf("%d %d %d\n",i,buf[0],buf[1]);
	i = SSCANF("0778a"," %o",&b);
	printf("%d %d\n",i,b);
	i = SSCANF("778"," %u",&b);
	printf("%d %d\n",i,b);
	i = SSCANF("-778"," %u",&b);
	printf("%d %d\n",i,b);
	i = SSCANF("0xA2 7B","%x %x",&a,&b);
	printf("%d %x %x\n",i,a,b);
	i = SSCANF(" xxx abc"," %s",buf);
	printf("%d %s\n",i,buf);
	i = SSCANF(" abcdefg","%[ abc]",buf);
	printf("%d %s\n",i,buf);
	i = SSCANF(" abcdefghijk","%[^g]",buf);
	printf("%d %s\n",i,buf);
}