Sign in
nest-open-source
/
nest-cam
/
v350
/
glibc
/
refs/heads/main
/
.
/
manual
/
examples
/
strncat.c
blob: f865167f4affde1d543c7fd9c6afa50aae33c659 [
file
] [
log
] [
blame
]
#include
<string.h>
#include
<stdio.h>
#define
SIZE
10
static
char
buffer
[
SIZE
];
main
()
{
strncpy
(
buffer
,
"hello"
,
SIZE
);
puts
(
buffer
);
strncat
(
buffer
,
", world"
,
SIZE
-
strlen
(
buffer
)
-
1
);
puts
(
buffer
);
}