?Case-Based Critical Thinking Questions
?
?Case 9-1

Melissa, a computer science engineering student, is learning the basics of programming by exploring arrays. She learns about different array methods. She wishes to learn more on inserting and deleting array items. She creates monthName array to extract only the three spring months-March, April, and May-from a calendar.
?Melissa wants to extract the spring months and store them in the monthName array. Identify a method Melissa should choose to perform this task.

A. ?springMonths = monthName.slice(2, 5);
B. ?springMonths = monthName.splice(2, 3);
C. ?springMonths = monthName.slice(3, 5);
D. ?springMonths = monthName.splice(5, 3);


Answer: A

Computer Science & Information Technology

You might also like to view...

Name and explain two benchmark test categories.

What will be an ideal response?

Computer Science & Information Technology

A technician needs to configure a Windows 10 computer to start a background service automatically each time the computer is booted.   Which of the following tools should the technician use?

A. Print Management B. Task Manager C. Services Console D. Resource Monitor

Computer Science & Information Technology

A user is having trouble logging on to the domain from a computer that has been out of service for several months, and nobody else can seem to log on from the computer. What should you try first to solve the problem?

a: Reinstall Windows on the workstation and create a new computer account in the domain. b: Rename the computer and create a new computer account with a new name. c: Reset the computer account, remove the computer from the domain and rejoin it to the domain. d: Disable the computer account, remove the computer account from the domain and rejoin it to the domain.

Computer Science & Information Technology

Which of the following pointer arithmetic operations provides an index?

A. ptr + 5 B. 5 + ptr C. ptr1 + ptr2 D. ptr1 - ptr2 E. ptr--

Computer Science & Information Technology