/** * Similar to reader0 but uses malloc to dynamically allocate memory * @author gtowell * Created: March 2021 * **/ #include #include #include #ifndef NULL #define NULL (void *)0 #endif #define MAX_LINES 16 int main(int argc, char* argv[]) { char* a[MAX_LINES]; FILE* f = fopen(argv[1], "r"); if (!f) { fprintf(stderr, "No such file\n"); return 1; } for (int i = 0; i