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
Anarel [89]
3 years ago
13

An array of String objects, words, has been properly declared and initialized. Each element of words contains a String consistin

g of lowercase letters (a–z). Write a code segment that uses an enhanced for loop to print all elements of words that end with "ing".
As an example, if words contains {"ten", "fading", "post", "card", "thunder", "hinge", "trailing", "batting"}, then the following output should be produced by the code segment.
fading trailing batting
Write the code segment as described above. The code segment must use an enhanced for loop.
Computers and Technology
1 answer:
finlep [7]3 years ago
4 0

Answer:

Explanation:

#include <iostream>

using namespace std;

int main()

{

   string cwords[8]={"ten", "fading", "post", "card", "thunder", "hinge", "trailing", "batting"};

   string temp="";

   for (int i=0; i<8; i++)

   {

       temp=cwords[i];

       int j=temp.length();

       if (temp[j-3]=='i' && temp[j-2]=='n' && temp[j-1]=='g')

       {

           cout<<temp<<endl;

       }

   }

   return 0;

}

You might be interested in
Additional rows and columns are inserted into a table using the
Paladinen [302]
The Option D , Table Tools Insert
6 0
2 years ago
Suppose the CashRegister needs to support a method void undo() that undoes the addition of the preceding item. This enables a ca
a_sh-v [17]

Answer:

previousAddition instance variable

Explanation:

In order to accomplish this you would need to add a previousAddition instance variable. In this variable you would need to save the amount that was added at the end of the process. Therefore, if a mistake were to occur you can simply call the previousAddition variable which would have that amount and subtract it from the total. This would quickly reverse the mistake, and can be easily called from the undo() method.

3 0
3 years ago
A sql-6-5.sql file has been opened for you. Write each of the following tasks as a SQL statement in a new line (remember that yo
Ghella [55]

Answer:

The query is as follows:

select sum(stock) as total_stock from products

Explanation:

Required

Return total stock using the alias total_stock from the product table.

The explanation of the query is as follows:

select ----> This implies that data is to be selected from the table

sum(stock) ----> This adds up entries in stock column

as total_stock ---> This represents the alias used for sum(stock)column where

from products  ----> The table being queried

Take for instance, the content of the table is:

SN  Product Stock

1      Apple     5

2     Orange   3

3      Banana   8

The query will return the following table:

total_stock

16

5 0
3 years ago
Of the following hard drives, which one is fastest?
Anvisha [2.4K]

Answer:

D. PCIe NVMe SSD card

Explanation:

PCIe NVMe SSD cards are ludicrously fast even compared to some modern SSD drives today. Some can even average up to 8 GB/s while moving/copying files, though, the price tag is pretty high compared to some other SSD / HDD drives.

5 0
3 years ago
Describe network in the terms of computer lab
Alecsey [184]
A network is defined as a group of two or more computer systems linked together. There are many types of computer networks, including the following: ... wide-area networks(WANs): The computers are farther apart and are connected by telephone lines or radio waves.
3 0
3 years ago
Other questions:
  • The ________ phase in a project involves documenting lessons learned from the project, so that the experience is useful to other
    13·1 answer
  • Which printout will result from the snippet of code?
    9·1 answer
  • Which of these engine components forms a tight seal between the piston and the cylinder and is necessary for proper engine opera
    13·2 answers
  • Which of the following statements is correct?
    14·1 answer
  • Henry, a graphic artist, wants to create posters. Which software should Henry use for this purpose?
    13·1 answer
  • I just got my driver's permit!!! However, it says I have 2 restrictions. What are the restrictions? Is it the not being allowed
    13·1 answer
  • When designing your navigation, your primary objective should be to include keywords for search engines.
    6·1 answer
  • HURRY!!!!!!!!!!!!!
    15·1 answer
  • Rachel needs to include a new organizational chart in her project. Which type of illustration should she use?: *
    11·1 answer
  • How to send an email to multiple recipients individually outlook
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!