/*
Example get a substring from a string in C language
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
int main(int argc, char *argv[]) {
char buff[] = "hello lautturi.com";
char subbuff[6];
// intercept string in c
memcpy( subbuff, &buff[6], 5 ); // Intercept 5 characters from the 6th position (7th character)
subbuff[5] = '\0';
printf("%s",subbuff);
return 0;
}
// output
// lautt