#include #include #define LEN 25 int main(void) { char str[] = "The Aalborg University basis year"; char target[25]; int i; for(i = 0; i < LEN; i++) target[i] = '\0'; strncpy(target, str+4, 18); printf("The substring is: %s\nLength: %i\n", target, strlen(target)); return 0; }