#include<stdio.h>
#define BUFSZ 4
int main()
{
//int size=BUFSZ-1;
char attrValue[11]="keshakesha";
char scanBuf[BUFSZ];
//char temp[BUFSZ];
//int num = sprintf(out,"%*.*s",BUFSZ,BUFSZ,fmyStr);
//sprintf(out,"%s",fmyStr);
snprintf(scanBuf,sizeof(scanBuf),"%s",attrValue);
int num=sscanf(scanBuf,"%s",scanBuf);
//int num= sscanf(fmyStr,"%*.*s",&size,out);
printf("items read: %d\n",num);
printf("String read: %s\n",scanBuf);
//printf("%d\n",n);
//printf("%s\n",temp);
return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4KI2RlZmluZSBCVUZTWiA0IAppbnQgbWFpbigpCnsKLy9pbnQgc2l6ZT1CVUZTWi0xOwpjaGFyIGF0dHJWYWx1ZVsxMV09Imtlc2hha2VzaGEiOwpjaGFyIHNjYW5CdWZbQlVGU1pdOwovL2NoYXIgdGVtcFtCVUZTWl07Ci8vaW50IG51bSA9IHNwcmludGYob3V0LCIlKi4qcyIsQlVGU1osQlVGU1osZm15U3RyKTsKCi8vc3ByaW50ZihvdXQsIiVzIixmbXlTdHIpOwpzbnByaW50ZihzY2FuQnVmLHNpemVvZihzY2FuQnVmKSwiJXMiLGF0dHJWYWx1ZSk7CmludCBudW09c3NjYW5mKHNjYW5CdWYsIiVzIixzY2FuQnVmKTsKLy9pbnQgbnVtPSBzc2NhbmYoZm15U3RyLCIlKi4qcyIsJnNpemUsb3V0KTsKcHJpbnRmKCJpdGVtcyByZWFkOiAlZFxuIixudW0pOwpwcmludGYoIlN0cmluZyByZWFkOiAlc1xuIixzY2FuQnVmKTsKLy9wcmludGYoIiVkXG4iLG4pOwovL3ByaW50ZigiJXNcbiIsdGVtcCk7CnJldHVybiAwOwp9Cg==