#include "string.h" #include "stdlib.h" int main( void ) { char *s1 = "test_string"; char *s2 = "append"; char d[15]; size_t n; *d = '\0'; n = strlcat( d, s1, 15 ); if( n != 11 ) exit( 1 ); if( strcmp( d, s1 ) != 0 ) exit( 1 ); n = strlcat( d, s2, 15 ); if( n != 14 ) exit( 1 ); if( strcmp( d, "test_stringapp" ) != 0 ) exit( 1 ); exit( 0 ); }