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
Type of file containing instructions that tell your computer how to perform ___
julsineya [31]

Answer:

A)File

B)Native

C)Extension

D)File size

Explanation:

6 0
2 years ago
What is the purpose of the product backlog refinement
BigorU [14]

Answer:

A

Explanation:

6 0
2 years ago
Read 2 more answers
1. How many bits would you need to address a 2M × 32 memory if:
Dominik [7]

Answer:

  1. a) 23       b) 21
  2. a) 43        b) 42
  3. a) 0          b) 0

Explanation:

<u>1) How many bits is needed to address a 2M * 32 memory </u>

2M = 2^1*2^20, while item =32 bit long word

hence ; L = 2^21 ; w = 32

a) when the memory is byte addressable

w = 8;  L = ( 2M * 32 ) / 8 =  2M * 4

hence number of bits =  log2(2M * 4)= log2 ( 2 * 2^20 * 2^2 ) = 23 bits

b) when the memory is word addressable

W = 32 ; L = ( 2M * 32 )/ 32 = 2M

hence the number of bits = log2 ( 2M ) = Log2 (2 * 2^20 ) = 21 bits

<u>2) How many bits are required to address a 4M × 16 main memory</u>

4M = 4^1*4^20 while item = 16 bit long word

hence L ( length ) = 4^21 ; w = 16

a) when the memory is byte addressable

w = 8 ; L = ( 4M * 16 ) / 8 = 4M * 2

hence number of bits = log 2 ( 4M * 2 ) = log 2 ( 4^1*4^20*2^1 ) ≈ 43 bits

b) when the memory is word addressable

w = 16 ; L = ( 4M * 16 ) / 16 = 4M

hence number of bits = log 2 ( 4M ) = log2 ( 4^1*4^20 ) ≈ 42 bits

<u>3) How many bits are required to address a 1M * 8 main memory </u>

1M = 1^1 * 1^20 ,  item = 8

L = 1^21 ; w = 8

a) when the memory is byte addressable

w = 8 ; L = ( 1 M * 8 ) / 8 = 1M

hence number of bits = log 2 ( 1M ) = log2 ( 1^1 * 1^20 ) = 0 bit

b) when memory is word addressable

w = 8 ; L = ( 1 M * 8 ) / 8 = 1M

number of bits = 0

5 0
2 years ago
3. Which of the following is a single piece of information related to the person, place,
stepan [7]
I think the answer is field
8 0
3 years ago
Read 2 more answers
An attacker has obtained the logon credentials for a regular user on your network. Which type of security threat exists if this
jarptica [38.1K]

Answer:

privilege escalation.

Explanation:

An access control can be defined as a security technique use for determining whether an individual has the minimum requirements or credentials to access or view resources on a computer by ensuring that they are who they claim to be.

Simply stated, access control is the process of verifying the identity of an individual or electronic device. Authentication work based on the principle (framework) of matching an incoming request from a user or electronic device to a set of uniquely defined credentials.

Basically, authentication and authorization is used in access control, to ensure a user is truly who he or she claims to be, as well as confirm that an electronic device is valid through the process of verification

Hence, an access control list (ACL) primarily is composed of a set of permissions and operations associated with a user account or new technology file system (NTFS) file such as full control, read only, write, read and execute and modify.

In this scenario, an attacker or hacker was able to obtain the logon credentials for a regular user on your network. Thus, the type of security threat which exists if this user account is used by the attacker or hacker to perform administrative functions is privilege escalation.

Privilege escalation can be defined as a network or security threat which involves the exploitation of a design flaw, bug or unsecured configuration settings in a software program (application), operating system (OS), computer system, etc., so as to have an unauthorized access and gain more permissions, elevated rights or privileges that are normally protected from a user account or software program.

Hence, when an attacker or malicious user such as a hacker gains an unauthorized access to the privileges of another user account beyond what is intended or entitled to a user, it is known as privilege escalation.

6 0
3 years ago
Other questions:
  • The Active Directory Users and Computers tool can be used to:______.
    11·1 answer
  • A user found that their personal data had been exfiltrated from their computer by a malicious program that they clicked on sever
    12·1 answer
  • The parameter passing mechanisn used in C is
    5·2 answers
  • Help me pls, thank you
    12·2 answers
  • Q13. On which option do you click to
    12·1 answer
  • Shelby wants to move “ExpirationDate” to the top of the datasheet. What should she do?
    13·1 answer
  • A total stranger is trolling Jack online. He’s offended and annoyed. How can Jack stop the troll in his or her tracks? (5 points
    10·2 answers
  • with the advent of technology one can experience special features such as 3D theater experiences true or false
    8·1 answer
  • If a friend gave a used Wii disc to someone, and they put it in their Wii, could they play it? Nintendo Switch games can only be
    14·1 answer
  • How does the number of jobs in internet media compare to the number of jobs in tv broadcasting and print media?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!