Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

const int ROW=3,COL=6;//global variable int main() { double cap=0; char name[ROW

ID: 3569834 • Letter: C

Question

const int ROW=3,COL=6;//global variable
int main()
{
double cap=0;
char name[ROWS][COLS]={"ERIC","JOSH","C.J."};
int age[ROWS]={15,17,18};
int thisyear=2014;
char*oldest= wholeoldest(name,ROWS,cap,&thisyear);
// in above calling.... 'cap'is a refrence variable

int birthD=whenBorn(&age[1],thisyear,ROWS);
age[1]= calcnewage(name[1],age[1]);
bool same= compareLetter(name[1][2],name[2]);
return 0;
}

1- write a prototype for the 'wholesoldest' function


2- write a prototype for the 'whenBorn' function

3-write a prototype for the 'calcnewage' function

4-write a prototype for the 'compareletter' function

Explanation / Answer

1) char *wholesoldest(char name[][6], int rows, double &cap, int *thisyear);
2) int whenBorn(int *age, int thisyear, int rows);
3) int calcnewage(char name[], int age);
4) bool compareLetter(char letter, char *name);