TASK 1: /* Save the entire array it into a file called 'filename' in a binary file format that can be loaded by intarr_load_binary(). Returns zero on success or a non-zero error code on failure. Arrays of length 0 should produce an output file containing an empty array. */ int intarr_save_binary( intarr_t* ia, const char* filename ); /* Load a new array from the file called 'filename', that was previously saved using intarr_save_binary(). Returns a pointer to a newly-allocated intarr_t on success, or NULL on failure. */ intarr_t* intarr_load_binary( const char* filename ); Add and commit a single C source file called "t1.c" containing implementations of these two functions. The file must include the "intarr.h" header file.. The code may call any other functions declared in "intarr.h". Your code will be linked against our reference implementation for testing, so make sure the submitted file does not contain functions with the same names. Use your own implementation of the intarr_t functions for your local testing. Note that you do not need to have completed all of Lab 5 to do this, but seek help right away if you have not completed intarr_create() at least. Performance hint: calls to write() are relatively expensive. Try to use as few as you can
Get Free Quote!
274 Experts Online