1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dezoksy [38]
3 years ago
14

Assume that scotus is a two-dimensional character array that stores the family names (last names) of the nine justices on the Su

preme Court of the United States. Assume no name is longer than twenty characters. Assume that scotus has been initialized in alphabetical order. Write some code that will print each to standard output, each on a separate line with no other characters.
Computers and Technology
1 answer:
dangina [55]3 years ago
5 0

Answer:

for (int i = 0; i < 9; ++i) {

int k = 0;

while (k < 20 && scotus[i][k] != '') {

cout << scotus[i][k];

k++; }

cout << "\n"; }

Explanation:

scotus here is a two dimensional array. It contains names of 9 justices. so the loop starts from 0 and ends when i points to the last name element in the array. Then a while loop is used to check that name is longer than twenty characters and will keep on printing each output on the separate line.

Another way to write this:

for (int i = 0; i < 9; i++){

cout << scotus[i] << "\n"; }

This loop will keep on executing and printing the names of the nine justices at every iteration until it reaches the end of the array (last element of the array scotus).

You might be interested in
How can we keep technology alive?
kotegsom [21]
"<span>How can we keep technology alive?" It will always stay alive

"</span><span>What is the history of educational technology?" Once The University of Pennsylvania made the first computer

"</span><span>What are the benefits of using technology for teaching and learning?"  It is easier to do homework, turn in homework, do course recovery, and easier to check your grades.

"How will it benefit children in the future?" Same way it does now, and even more.
</span> 
5 0
3 years ago
How does white balancing affect the images recorded by a camera?
garri49 [273]
It makes the images appear more brighter......?
5 0
4 years ago
6. How might you go about securing an internship or job on LinkedIn?
Greeley [361]
Seems nice I mean yeah its be fine
4 0
4 years ago
Read 2 more answers
How can the geographic location of data centers be beneficial for a company that is concerned about sustainability?
goldfiish [28.3K]
Answer : A- by placing data centers in remote areas so that their emissions are less of a concern. B- by allowing the use of renewable local resources such as solar or wind energy
6 0
3 years ago
Hi AllyUbongAbasiEtuk
Ainat [17]

Answer:

not a valid question

Explanation:

4 0
4 years ago
Read 2 more answers
Other questions:
  • In a digital drawing program, when an object is highlighted, boxes appear at the sides and corners. These boxes can be grabbed a
    13·1 answer
  • fill down feature on a formula and you need to keep a cell reference the same which one will allow you to keep the same cell ref
    15·1 answer
  • Write a function to output an array of ints on a single line. Funtion Should take an array and an array length and return a void
    9·1 answer
  • A network technician is designing a network for a small company. The network technician needs to implement an email server and w
    7·1 answer
  • What is an Odometer (Driver's Ed)
    7·2 answers
  • My speaker on my phone is not working, when I try and play music and videos the sound dosen't work. However my alarm works. Can
    9·2 answers
  • Test unit 8 edhesive answers ​
    15·1 answer
  • PLEASE HELP THANK YOU
    7·1 answer
  • Write a program that creates a two-dimensional array named height and stores the following data:
    15·2 answers
  • Plz help me I need help​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!