A
#include <string.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
if(argc==1) {
printf("Usage: prog <filename.c>");
return 0;
}
size_t l = strlen(argv[1]);
char *buf = new char[5+l];
snprintf(buf, 5+l, "gcc %s", argv[1]);
system(buf);
system(argv[i]);
delete[] buf;
}