Back to index

glibc  2.9
strncat.c
Go to the documentation of this file.
00001 #include <string.h>
00002 #include <stdio.h>
00003 
00004 #define SIZE 10
00005 
00006 static char buffer[SIZE];
00007 
00008 main ()
00009 {
00010   strncpy (buffer, "hello", SIZE);
00011   puts (buffer);
00012   strncat (buffer, ", world", SIZE - strlen (buffer) - 1);
00013   puts (buffer);
00014 }