Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C code It is required to produce test code necessary to module test a student records module, described externally by the following API: (10 marks)

C code
image text in transcribed
It is required to produce test code necessary to module test a student records module, described externally by the following API: (10 marks) /* the longest possible length of a name / \#define LONGEST_NAME 20 /* * Adds student. If firstname too long, truncates * returns: row number on success, 1 on error / const char *ID ) ; /* otherwise fail (1) / int remove_student (const char *ID) ; 1 * Save the entire database: open the file, write all, close file * First line = number of students. * Then one student per line, in the format ID, Iname, fname * Return number of students saved on success, 1 otherwise * / int save ( const char f ilename) ; Write a test harness to perform a module test, being careful to include at least one successful call and one error call for each function to be tested

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions