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
SOVA2 [1]
3 years ago
5

Assume that a 5 element array of type string named boroughs has been declared and initialized. Write the code necessary to switc

h (exchange) the values of the first and last elements of the array. So, for example, if the array's initial values were: brooklyn queens staten_island manhattan bronx then after your code executed, the array would contain: bronx queens staten_island manhattan brooklyn
Computers and Technology
1 answer:
hammer [34]3 years ago
6 0

Answer:

Explanation:

Let's do this in python. First we can set a placeholder variable to hold the first element of the array, then we can set that first element to the last element (5th) of that array. Then we set the last element of that array to the placeholder, which has value of the original first element of the array

placeholder = boroughs[0] # in python, 0 is the first element or arra

boroughs[0] = boroughs[-1] # -1 means the last element of the array

boroughs[-1] = placeholder

You might be interested in
Assume that scotus is a two-dimensional character array that stores the family names (last names) of the nine justices on the Su
dangina [55]

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).

5 0
3 years ago
A team is building an application that must persist and index JSON files in a highly-available data store. Latency of data acces
Vsevolod [243]

Answer:

DynamoDB is the correct answer of this question.

Explanation:

DynamoDB is a completely controlled NoSQL server website that allows server tables to be generated that can store and recover any amount of information.DynamoDB is an Amazon Web Services server platform that promotes software architectures and web resources priced by key.

DynamoDB can accommodate over 10 billions requests in a day, and therefore can sustain peaks of over 20 million queries per second.

5 0
4 years ago
How does email software protect the privacy of your messages?
zhannawk [14.2K]
D is the answer to the question hope it helps
5 0
3 years ago
Read 2 more answers
In your presentation you add a textbox to _______.
frosja888 [35]
The answer to this question is letter "A. cite a source". Citing a source is an important content of the presentation so as not to take the credit away from the real source of the ideas presented. Not citing the sources could be a ground for plagiarism. 
3 0
3 years ago
What is an XML-based open standard for exchanging authentication and authorization information and is commonly used for web appl
nalin [4]

Answer:

SAML.

Explanation:

SAML seems to be an accessible standardized XML-based for some of the sharing of validation and verification details and has been generally implemented for the web apps and it seems to be a design that would be SSO. Verification data is shared via XML documentation which are securely signed. So, the following answer is correct according to the given scenario.

4 0
3 years ago
Other questions:
  • Which of the following is true about the strategy that uses page fault frequency (PFF) to prevent thrashing?
    6·2 answers
  • Sensing that the future of computing was in personal computers and that computers' power would reside not in their size but in t
    5·1 answer
  • Which two men developed the steam engine?
    8·1 answer
  • Items that represent features of smartphones apps
    12·1 answer
  • Select the correct answer from each drop-down menu.
    8·1 answer
  • _____ can be lost or stolen by cybercriminals. Select 2 options.
    11·2 answers
  • Rube Goldberg project NEED HELP ASAP
    13·1 answer
  • Python: Write a program for a small restaurant that sells pizzas. You may consider it as a prototype of a realistic online appli
    13·1 answer
  • Create an application named SalesTransactionDemo that declares several SalesTransaction objects and displays their values and th
    12·1 answer
  • Html is a markup language that lets you identify common sections of a web page
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!