Question: Create a source file, driver.c , defining the following local variables in the main function: struct pokemon pokemonbank[5]; int numpokemons; Note: You can define another

  • Create a source file, driver.c, defining the following local variables in the main function:

    struct pokemon pokemonbank[5]; int numpokemons; 

    Note: You can define another array in the driver code if you need for your testing cases.

  • Test readfile/writefile by calling them with testing data.

    • You may get input from the keyboard or hardcode your testing data in the driver code.

    • The output of the program must be clear and self-explanatory (DO NOT just print like "The functions worked perfectly.", "SUCCESS", etc)

    • Test cases and results must be definitive proof that the functions work; make sure that your test cases can really prove that the functions work. (critical thinking!, e.g., "What if the function was totally broken and it did not access the array and the file at all? Would the results be different from the successful case?")

  • The driver code MUST NOT directly read or write a file.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!