23 lines
261 B
C
23 lines
261 B
C
|
#include <unistd.h>
|
||
|
|
||
|
char *ft_strncpy(char *dest, char *src, unsigned int n);
|
||
|
|
||
|
void ft_print(char *str)
|
||
|
{
|
||
|
while(*str != 0)
|
||
|
{
|
||
|
write(1, str++, 1);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
int main(void)
|
||
|
{
|
||
|
char *a;
|
||
|
char b[6];
|
||
|
|
||
|
b[5] = 'd';
|
||
|
a = "00000";
|
||
|
ft_strncpy(b, a, 5);
|
||
|
ft_print(b);
|
||
|
}
|