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
Lemur [1.5K]
3 years ago
12

Consider the following code: // Merge mailing list m2 into m1 void merge (MailingList m1, MailingList m2) { for (int i = 0; i &l

t; m2.numEntries(); ++i) m1.add (m2.getEntry(i)); } The programmers who first encountered this code fragment weren’t sure if it was in C++ or Java. In fact, with the addition of some appropriate declarations, it would probably compile correctly in either language. Which language is it? Explain your answer.
Computers and Technology
1 answer:
Inessa [10]3 years ago
3 0

Answer:

That is a Java language

Explanation:

This is simply Because C++ language does not support the calling of the methods without parameters and with the .(dot) operator.

It can also be clearly noted that This is the functionality of Java, for example, to sort we call Array.Sort().

So the parameter here is passed by placing the variable at front with the . (dot).

You might be interested in
Your college has several campuses located across the city. within each campus, the buildings are interconnected with a campus ar
iris [78.8K]

Answer:

Metropolitan Area Network (MAN)

Explanation:

8 0
2 years ago
Which of the following statements about the continue statement is true?
kotykmax [81]

Answer:

Option (d)

Explanation:

  • The Continue statement is used inside the looping statements.
  • When a Continue statement is encountered inside the loop, it stops executing the current iteration ( it skips the next steps in the current iteration) and goes to the next iteration.
  • It then continues to execute the loop for the next iteration.
  • The continue statement can be used in all the looping structures ( for loop, while loop, do while loop ).
  • The syntax for continue statement is " continue; "
  • Options (a),(b),(c) are wrong options.
  • Option (d) is correct option.
8 0
3 years ago
When Kim was working in her Microsoft® Excel® spreadsheet, she accidentally placed her book on the spacebar and erased the conte
zaharov [31]

Answer:

The undo tool.

Explanation:

Microsoft Excel is a spreadsheet application developed by Microsoft, it is used for analysing data. It's worksheets are made up of columns and rows or fields and records.

There are different ways of entering data to a cell. Click on the cell and type the data, copy and paste to the target cell, double-click on the cell to correct data and click on a cell and press the spacebar key to clear the data.

Excel records the action of event, so when a mistake is made like deleting a crucial cell data value, the undo tool is used to recover the data, since it holds records of events. The redo tool is the reverse of the undo tool.

5 0
3 years ago
Which is the most efficient way to include a space after each paragraph
TEA [102]

I think the question is referring to the tab key.

5 0
3 years ago
Read 2 more answers
Write two statements to read in values for my_city followed by my_state. Do not provide a prompt. Assign log_entry with current_
Ainat [17]

Answer:

Here is the program:

current_time = '2014-07-26 02:12:18:'  

my_city = ''

my_state = ''

log_entry = ''

 

my_city = input("")   #reads in value for my_city

my_state = input("")  #reads in value for my_state

log_entry = current_time + ' ' + my_city + ' ' + my_state   #concatenates current_time, my_city and my_state values with ' ' empty space between them

 

print(log_entry)

Explanation:

You can also replace

log_entry = current_time + ' ' + my_city + ' ' + my_state  

with

log_entry = f'{current_time} {my_city} {my_state}'

it uses f-strings to format the strings

If you want to hard code the values for my_city and my_state then you can replace the above

my_city = input("")

my_state = input("")

with

my_city = "Houston"

my_state = "Texas"

but if you want to read these values at the console from user then use the input() method.

The screenshot of the program along with the output is attached.

7 0
3 years ago
Other questions:
  • What language used orthogonality as a primary design criterion?
    8·1 answer
  • You have dinner with your family and tell them that you have taken bcis. your mother tells you that she is proud of you and that
    9·1 answer
  • Debbie’s colleague hasn’t provided her the required details to complete an important report. She is upset by this, and she sends
    14·2 answers
  • Connection-oriented protocols protect against dropped data by forming connections and using what type of constant stream?
    5·1 answer
  • What do computer programs generally try to solve and how? A) Computer programs generally try to solve a well-defined problem usi
    14·1 answer
  • Write a program that asks the user to provide a word, validate that it is a word, and print the word.
    6·1 answer
  • Derive the three-dimensional transformation matrix for scaling an object by a scaling factor s in a direction defined by the dir
    15·1 answer
  • How do you put text in MS publisher?<br><br> When do you use text wrapping?
    14·1 answer
  • Use the function varimp() on the output of train() and save it to an object called imp:_____.
    5·1 answer
  • What does syntax error mean :-;<br>explain briefly.<br><br>thankyou!
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!