Step 3: Defining the add_rec(student st, int *itemcount) function to add a new record to the the array of student objects. This function takes two arguments. The first argument is the array of student objects(st) and the second argument is the number of items in the array. This function firstly checks the new record(using the search function that is defined in the next step) before it is allowed to be appended to the array to avoid duplicate records. When the new item is added the value of itemcount variable increases by 1 that means the number of records in the list increases.
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: