I am using the func of sprintf on 64bit linux. Weird thing happens when I tested the string written by sprintf or snprintf. The way I used it: 

```
char s[256];
int current=0;
for (int i=0; i<5; i++)
{
    current += sprintf(s+current, "d", i);
}

printf("string is %s \n", s);

```

All I get is : string is ddddd, if I change sprintf(s,"d", i) to "c" or "lf", all I get is ccccc or lflflflflf. Anyone has any clue about this ? Thanks a lot!