Chapter 7: Problem 15
a) Write a statement that declares a string array initialized with the following strings: "Mercury", "Venus", "Earth", and "Mars". b) Write a loop that displays the contents of cach element in the array you declared in A. c) Write a loop that displays the first character of the strings stored in cach element of the array you declared in A. (Hint: Use the string class's charat method discussed in Chaprer \(2 .\)
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.