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
LekaFEV [45]
3 years ago
15

Write a program that uses an STL List of integers. a. The program will insert two integers, 5 and 6, at the end of the list. Nex

t it will insert integers, 1 and 2, at the front of the list and iterate over the integers in the list and display the numbers. b. Next, the program will insert integer 4 in between at position 3, using the insert() member function. After inserting it will iterate over list of numbers and display them. c. Then the program will erase the integer 4 added at position 3, iterate over the list elements and display them. d. Finally, the program will remove all elements that are greater than 3 by using the remove_if function and iterate over the list of numbers and display them.
Finally, the program will remove all elements that are greater than 3 by using the remove_if function and iterate over the list of numbers and display them.
Computers and Technology
2 answers:
Allisa [31]3 years ago
7 0
Hi! I don’t know what any of this means but I just wanted to tell you that I hope you have an amazing day and god/allah/etc bless you :)
poizon [28]3 years ago
5 0

Answer:

answer:

#include <iostream>

#include<list>

using namespace std;

bool Greater(int x) { return x>3; } int main() { list<int>l; /*Declare the list of integers*/ l.push_back(5); l.push_back(6); /*Insert 5 and 6 at the end of list*/ l.push_front(1); l.push_front(2); /*Insert 1 and 2 in front of the list*/ list<int>::iterator it = l.begin(); advance(it, 2); l.insert(it, 4); /*Insert 4 at position 3*/ for(list<int>::iterator i = l.begin();i != l.end();i++) cout<< *i << " "; /*Display the list*/ cout<<endl; l.erase(it); /*Delete the element 4 inserted at position 3*/ for(list<int>::iterator i = l.begin();i != l.end();i++) cout<< *i << " "; /*Display the list*/ cout<<endl;

l.remove_if(Greater); for(list<int>::iterator i = l.begin();i != l.end();i++) cout<< *i << " ";

/*Display the list*/

cout<<endl; return 0;

}

You might be interested in
Toolchain "mingw gcc" is not detected. refer to "c/c++ development user guide", "before you begin" how to install toolchains.
QveST [7]
<span>Answer: "The CDT MinGW toolchain will find this install if it is located in the default C:\MinGW directory, the MinGW bin directory is placed in your path, or if the MinGW location is stored in the MINGW_HOME environment variable. Note that the Wascana IDE has been discontinued."</span>
5 0
3 years ago
What do you think has happened to the Earth? Provide evidence from the movie. *
Jet001 [13]

Answer:

We dont have the movie-

Explanation:

Maybe just look at ur notes

8 0
3 years ago
Given table R(A,B,C) and S(C,D,E), which of the following SQL statements would find the record(s) with null values on the column
sashaice [31]

Answer:

a. select * from R, S where R.C = S.C (+); (R left outer join S)

Explanation:

In SQL, left outer join of two tables R and S joined on a common column C means that all rows of R are included in the result including those rows for which value of R.C is null. On the contrary, right outer join of two tables R and S joined on a common column C means that all rows of S are included in the result including those rows for which value of S.C is null. As per the question our requirement is the former. So option a is correct.

4 0
4 years ago
Hy does a bus network need regular hubs if it is to cover very much ground?
Norma-Jean [14]
A bus network can only accommodate a number connections and a limited area. If there were more hubs connected to the bus network, the coverage of the network would be expanded and the number of connections will also be increased.
7 0
3 years ago
The physical view of a database system refers to
tigry1 [53]

Answer:

C. how and where the data are physically arranged and stored.

Explanation:

The physical view as the name implies describes how and where the data are physically arranged in the database. This deals with the physical arrangement of data in the database. This user usually view the database in a logical way. e.g table. The physical arrangement is usually used by database specialists. There can be multiple logical view of a database but just a single view of the physical view.

8 0
3 years ago
Other questions:
  • How to create a function, called separate_int_and_str, which takes in a list and separates out the integer values and strings in
    9·1 answer
  • Answer the following Python Interview questions • How is Python an interpreted language? • What is the difference between Python
    10·1 answer
  • When a style set has been inserted in a document, the spacing of the style set can be easily changed.?
    8·1 answer
  • How many bits are used to direct traffic to specific services running on a networked computer?
    6·1 answer
  • Help my windows pc has a black screen
    5·2 answers
  • Write a C function which takes three parameters which are the cost for an item in a grocery store, the quantity to buy, and the
    12·2 answers
  • In the lab, you defined the information systems security responsibility for each of the seven domains of a typical IT infrastruc
    10·1 answer
  • Why use LinkedIn Sales Navigator?
    5·1 answer
  • Why is color important for all objects drawn ?​
    5·1 answer
  • Consider the following code using the posix pthreads api:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!