int main()
{
char buff[24];
int ret,i, a = 34, b = 234;
ret = sprintf(buff, "%d minus %d equals %d",a,b,a-b);
printf ("(%s) is the result and is %d characters\n",buff,ret);
for(i = 0; i<24;i++)
{
printf("value at %d in buff is %c\n",i,buff[i]);
}
return 0;
}
////////////////////////////////////////////////////////////////////////////////
No comments:
Post a Comment