If employee is an array of objects with a public member function named setHoursWorked, which of the following statements correctly calls that function for the employee object in array element 5?
A) employee.setHoursWorked[5] = 40;
B) employee[5].setHoursWorked = 40;
C) employee.setHoursWorked[5](40) ;
D) employee[5].setHoursWorked(40) ;
E) setHoursWorked(employee[5], 40) ;
Correct Answer:
Verified
Q16: The statement int grades[ ] = {
Q17: If employee is an array of objects
Q18: The range-based for loop may be used
Q19: To access an array element, use the
Q20: To step through a one-dimensional array, accessing
Q22: After carrying out the following two statements,
Q23: The following two arrays string deptName[3] =
Q24: The following array definition is legal because
Q25: In C++ If you attempt to store
Q26: If the scores array is defined like
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents