mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-29 08:11:08 +00:00
16 lines
232 B
C
16 lines
232 B
C
#include <string.h>
|
|
#include <stdio.h>
|
|
|
|
#define SIZE 10
|
|
|
|
static char buffer[SIZE];
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
strncpy (buffer, "hello", SIZE);
|
|
puts (buffer);
|
|
strncat (buffer, ", world", SIZE - strlen (buffer) - 1);
|
|
puts (buffer);
|
|
}
|