Page 1 of 1

Write a function called countLaste() that takes two arguments. The first argument is an "array of struct student" (descr

Posted: Wed Apr 27, 2022 3:08 pm
by answerhappygod
Write A Function Called Countlaste That Takes Two Arguments The First Argument Is An Array Of Struct Student Descr 1
Write A Function Called Countlaste That Takes Two Arguments The First Argument Is An Array Of Struct Student Descr 1 (21.84 KiB) Viewed 31 times
Write A Function Called Countlaste That Takes Two Arguments The First Argument Is An Array Of Struct Student Descr 2
Write A Function Called Countlaste That Takes Two Arguments The First Argument Is An Array Of Struct Student Descr 2 (28.07 KiB) Viewed 31 times
Write a function called countLaste() that takes two arguments. The first argument is an "array of struct student" (described below) and the second is an int containing the number of stud ents in the array. The function returns an int equal to the number of students whose last name ends in the lower case letter "e". Assume the "lastChar()"function taking a "struct student" of the previous problems has been written and call it to find the last letters of the names of each student. struct student { char age; char credit_hrs; char name[15]; };

Write a function called lastChar() that takes "struct student" (as described below) and returns the last letter of the student's name (as a "char"). Assume the name is a NULL-terminated string with a field name of "name" struct student { char age; char credit_hrs; char name[15]; }; Submit History: (14 of 14)04/25/2201:29:05 char lastchar(struct student std) { char i, last; for (i=0; i<15; i++) { if (std.name 10') { if (std.name[i+1] == '\0') { std.name; return last; 6 last 789 } 10 11 } }