Følgende kan måske være en hjælp så du kan se hvilke parametre du kan anvende.
Bemærk linierne:
/* Format and print various data: */
j = sprintf( buffer, "\\tString: %s\\n", s );
j += sprintf( buffer + j, "\\tCharacter: %c\\n", c );
j += sprintf( buffer + j, "\\tInteger: %d\\n", i );
j += sprintf( buffer + j, "\\tReal: %f\\n", fp );
#include <stdio.h>
void main( void )
{
char buffer[200], s[] = "computer", c = 'l';
int i = 35, j;
float fp = 1.7320534f;
/* Format and print various data: */
j = sprintf( buffer, "\\tString: %s\\n", s );
j += sprintf( buffer + j, "\\tCharacter: %c\\n", c );
j += sprintf( buffer + j, "\\tInteger: %d\\n", i );
j += sprintf( buffer + j, "\\tReal: %f\\n", fp );
printf( "Output:\\n%s\\ncharacter count = %d\\n", buffer, j );
}
Hth