#include <iostream.h>
#include <string.h>
void main()
{
char str[256] = "ABCDEFGHIJ", str1[256];
strncpy(str1, str, 5);
str1[5] = '\0';
cout << str << endl << str1;
strncpy(str1, &str[5], 5);
str1[5] = '\0';
cout << str << endl << str1;
}