/**
* This copy n character of the string
* strncpy(destination, source, n characters)
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N 20
int main()
{
system("color 2f");
char *data = malloc(sizeof(char));
strncpy(data,"Indonesia is full countries",10);
puts(data);
return 0;
}
#include <stdlib.h>
#include <string.h>
#define N 20
int main()
{
system("color 2f");
char *data = malloc(sizeof(char));
strncpy(data,"Indonesia is full countries",10);
puts(data);
return 0;
}
No comments:
Post a Comment