RosettaCodeData/Task/Longest-common-subsequence/C/longest-common-subsequence-2.c
2016-12-05 22:15:40 +01:00

10 lines
240 B
C

int main () {
char a[] = "thisisatest";
char b[] = "testing123testing";
int n = sizeof a - 1;
int m = sizeof b - 1;
char *s = NULL;
int t = lcs(a, n, b, m, &s);
printf("%.*s\n", t, s); // tsitest
return 0;
}