/* c99: VLAs, system with the concatenation of two strings */ #include #include #include int my_system(char *s1, char *s2) { char s[strlen(s1) + 1 + strlen(s2) + 1]; strcpy(s, s1); strcat(s, " "); strcat(s, s2); return system(s); } int main() { my_system("ls", "-l"); return 0; }