What values are in the vector named pressures after the following code is executed? vector pressures; pressures.push_back(32.4); pressures.push_back(33.5); pressures.insert(pressures.begin(), 34.2); int index = 2; pressures.insert(pressures.begin() + index, 31.8); pressures.push_back(33.3); index = 1; pressures.erase(pressures.begin() + index); a. 34.2, 31.8, 33.3 b. 34.2, 33.5, 31.8, 33.3 c. 34.2, 33.5, 33.3 d. 34.2, 31.8, 33.5, 33.3

Answers

Answer 1

Answer:

Hence the correct option is A that is "34.2 31.8 33.5 33.3".

Explanation:  

Program:-  

#include <iostream>

#include<vector>  

using namespace std;  

int main()

{

int count =0;

vector<double> pressures;

pressures.push_back(32.4);

pressures.push_back(33.5);

pressures.insert(pressures.begin(), 34.2);

int index = 2;

pressures.insert(pressures.begin() + index, 31.8);

pressures.push_back(33.3);

index = 1;

pressures.erase(pressures.begin() + index);

for (auto it = pressures.begin(); it != pressures.end(); ++it)

cout << ' ' << *it;

return 0;

}


Related Questions

The program allows the user to type in any linux command and then executes that command, such as "pwd" or "echo". The problem is that it should allow multiple commands to be typed in and executed at the same time, but it only allows one at a time currently. Please help fix it so it allows multiple commands to be typed and executed.
Code:
#include
#include
#include
#include
#include
#include
void parse(char *line, char **argv)
{
while (*line != '\0') { /* if not the end of line ....... */
while (*line == ' ' || *line == '\t' || *line == '\n')
*line++ = '\0'; /* replace white spaces with 0 */
*argv++ = line; /* save the argument position */
while (*line != '\0' && *line != ' ' &&
*line != '\t' && *line != '\n')
line++; /* skip the argument until ... */
}
*argv = '\0'; /* mark the end of argument list */
}
void execute(char **argv)
{
pid_t pid;
int status;
if ((pid = fork()) < 0) { /* fork a child process */
printf("*** ERROR: forking child process failed\n");
exit(1);
}
else if (pid == 0) { /* for the child process: */
if (execvp(*argv, argv) < 0) { /* execute the command */
printf("*** ERROR: exec failed\n");
exit(1);
}
}
else { /* for the parent: */
while (wait(&status) != pid) /* wait for completion */
;
}
}
void main(void)
{
char line[1024]; /* the input line */
char *argv[64]; /* the command line argument */
while (1) { /* repeat until done .... */
printf("Enter Shell Command -> "); /* display a prompt */
fgets(line, 1024, stdin); /* read in the command line */
printf("\n");
parse(line, argv); /* parse the line */
if (strcmp(argv[0], "exit") == 0) /* is it an "exit"? */
exit(0); /* exit if it is */
execute(argv); /* otherwise, execute the command */
}
}
This function receives a commend line argument list with the */ /* the first argument being cd and the next argument being the */ /* directory to change.

Answers

Where is the question

please write an Introduction on intrusion detection system and prevention system
PLEASE

Answers

Answer:

An Intrusion Detection System (IDS) is a system that monitors network traffic for suspicious activity and issues alerts when such activity is discovered. It is a software application that scans a network or a system for harmful activity or policy breaching. Any malicious venture or violation is normally reported either to an administrator or collected centrally using a security information and event management (SIEM) system. A SIEM system integrates outputs from multiple sources and uses alarm filtering techniques to differentiate malicious activity from false alarms.

Where is the option to set Conditional Formatting rules found?
O Insert tab in the Formatting group
O Page Layout tab in the Styles group
O Home tab in the Styles group
Formulas tab in the Formatting group

Answers

Answer:

C. Home tab in the Styles group

Explanation:

answer on edge 2021

I really need help with this question! Please help!

Answers

Answer:

(C) Emma goes to sleep late and does not set an alarm.

Explanation:

Decomposing a problem is setting a back drop inference as to (WHY?) something happens . So Emma woke up late , the only reasonable (WHY?) in this question would be (C)

hi hi hihihihihivvv hihihihihihi v vhi

Answers

Answer: hihihihihihiihihi hihihihiihihih

Explanation: hi.

Please debbug this code for me

public class SavingAccount { // interest rate for all accounts private static double annualInterestRate = 0; private final double savingsBalance; // balance for currrent account // constructor, creates a new account with the specified balance public void SavingAccount( double savingsBalance ) { savingsBalance = savingsBalance; } // end constructor // get monthly interest public void calculateMonthlyInterest() { savingsBalance += savingsBalance * ( annualInterestRate / 12.0 ); } // end method calculateMonthlyInterest // modify interest rate public static void modifyInterestRate( double newRate ) { annualInterestRate = ( newRate >= 0 && newRate <= 1.0 ) ? newRate : 0.04; } // end method modifyInterestRate // get string representation of SavingAccount public String toString() { return String.format( "$%.2f", savingsBalance ); } // end method toSavingAccountString } // end class SavingAccount

Answers

Answer:

/

Explanation:

Which of the following is NOT an example of editing?
O Adjusting photos
O Cutting video and audio
O Proofreading written content
O Designing graphics

Answers

Answer:

ang answer po at proofreading written

content

Explanation:

if I wrong please correction me!

Please hurry, it's a test! 30 POINTS. :)
What computing and payment model does cloud computing follow?

Cloud computing allows users to_____ computing resources and follows the ______
payment model.

1. Buy, Own, Rent, Sell
2. pay-as-you-go, pay-anytime-anywhere, pay-once-use-multiple-times

Answers

1 own
2 pay anytime anywhere

I wake up the computer and remind it what to do ​

Answers

Answer:

what's the question or answer you want or is it a joke?

Explanation:

Brainliest if correct. 5. if you wanted b show how many employees at your office ride a bicycle to work in
comparison to the number of employees who drive a car, take public transportation,
or walk wihat visual would be best? (1 point)

Answers

Answer:

I believe a bar graph would be best for me. What are your answer options though?

Explanation:

When a derived class method has the same name as a base class method, it is often said that the derived class method ________ the base class method.

Answers

Answer:

will be

Explanation:

I'm not quite sure but I think that this is the answer for your question

Brainliest if correct. 3. You are researching ways to boost employee morale for a proposal. How can you
avoid copyright issues when you find materials from outside sources? (1 point)

Answers

To avoid copyright you can give credit to the original author. For example if I copy information that said “all humans are meant to be extinct by 2073” from notarealwebsite.com I shout credit them for this.

Window server how it works

Answers

The server handles the administrative group-related activities on a network. It basically stores, recover and send the files to all the devices that are connected to the network of that server. Windows has made a line of operating systems specifically for use in servers.
Windows Server is a group of operating systems designed by Microsoft that supports enterprise-level management, data storage, applications, and communications. Previous versions of Windows Server have focused on stability, security, networking, and various improvements to the file system.
A window is a separate viewing area on a computer display screen in a system that allows multiple viewing areas as part of a graphical user interface ( GUI ). Windows are managed by a windows manager as part of a windowing system . A window can usually be resized by the user.

A Product Manager has been given responsibility for overseeing the development of a new software application that will be deployed to a group of Accenture clients.

What would be the most time-saving and cost-effective way for the Product Manager to address the new application’s security considerations?


Utilize a DevSecOps approach to incorporate security into the development process from the beginning.


Schedule development of security features after the application’s initial release.


Design the application’s security features after the application’s initial build is complete.


Contract with an external vendor to develop a security solution separately from the main application.


I don't know this yet.

Answers

There are different software that has been developed today. The most time-saving and cost-effective way is to Design the application’s security features after the application’s initial build is complete.

Accenture is known for their work in improving business needs. They are constantly shifting to a new method of delivering information technology.

They are known to embed security into the product development life cycle helps secure the business and also keeping speed and assisting to remove friction.

Learn more about Accenture from

https://brainly.com/question/25737623

Create a Python script that will compare two (2) numbers entered by the user. Refer to the attached image and to the following algorithm. There is no need to create a class similar to how Java works.

3.1. User enters the first number.
3.2. User enters the second number.
3.3. If the first number is less than, greater than, or equal the second number, a message is displayed.

Please Help me. Thank You!
Marry Christmas!​

Answers

x = int(input("Enter first number\n"))

y = int(input("Enter second number\n"))

if x > y:

   print(x, "is greater than", y)

elif x < y:

   print(x, "is less than", y)

else:

   print(x, "is equal to", y)

i'm not the greatest coder, but it works :)

In Python which is the correct method to load a module math?

Answers

Answer: The math module is a standard module in Python and is always available. To use mathematical functions under this module, you have to import the module using import math .

Explanation:

How to use section header in word document?

Please answer fast​

Answers

Answer:

Configure headers and footers for different sections of a document

Click or tap the page at the beginning of a section. Select Layout > Breaks > Next Page. Double-click the header or footer on the first page of the new section.

Explanation:

RAM or RIM is correct?

Answers

RAM is the correct answer

Define Word Processing

Answers

Answer:

Word Processing refers to the act of using a computer to create, edit, save and print documents. ... Text can be inserted, edited, moved, copied or deleted within your document and the appearance of the text can be modified in numerous ways.

What type of databases is not limited by the data’s physical location?

Answers

A distributed database is not limited by the data's physical location.

As a Waterfall project manager, your goal is to minimize any changes that could lead to scope creep. You want to protect your team from building something the client or stakeholders don’t want. What formal and rigorous process could you set up to safeguard against this?

Answers

The necessary things that should be done to avoid a project scope creep include documenting the project requirements and setting up change control processes.

The scope of a project simply means the work that is required in order to complete a project. On the other hand, project scope creep means the occurrence that happens when changes are made to the scope without a change request.

To avoid project scope creep, it's important to document the project requirements, set up changes in control processes, and have a clear project schedule.

Learn more about projects on:

https://brainly.com/question/4853153

Read two numbers from user input. Then, print the sum of those numbers.
Hint -- Copy/paste the following code, then just type code where the question marks are to finish the code.
num1 = int(input())
num2 = ?
print(num1 + ?)

Answers

Answer:

First ? - int(input())

Second ? - num2

Explanation:

This works because we are just mimicing the first input in your first variable.

The second one is adding them together.

Don't remember to give me brainliest :)

Explain if a company is responsible for using computer components manufactured using fair trade practices. [9 marks]

Answers

Answer:

Fair trade practices aims at promoting the fair relationships between the buyers and producers. It is a kind of a social movement that makes the producers to provide the better conditions and humane working environment in case of developing countries.

• It also favors and supports the proper and substantial payment to the manufacturers and wages to the labors.

• It is a trading partnership that states the manufacturers to analyze and check their supply sources or resources and provide disclosure if the materials were produced or mined in the areas of conflict or areas of extreme poverty.

Explanation:

can you mark me as brainlist

Answer:

It is a trading partnership that states the manufacturers to analyze and check their supply sources or resources and provide disclosure if the materials were produced or mined in the areas of conflict or areas of extreme poverty.

_____ are extremely _____ data structure’s, used all the time, and there are so many _____ that can handle them to do useful things.
A _____ can be thought of as an array of arrays
•versatile
•functions
•arrays
•matrix

Answers

Answer:

arrays are extremely versatile  data structure’s, used all the time, and there are so many functions that can handle them to do useful things.

A matrix can be thought of as an array of arrays

Answer:

Arrays are extremely versatile data structure's, used all the time, and there are so many functions that can handle them to do useful things.

A matrix can be thought of as an array of arrays.

Happy Holidays

Explanation:

what is operating system?​

Answers

The software that supports a computer's basic functions, such as scheduling tasks, executing applications, and controlling peripherals.

in which country was Abacus build
if ur smart don't searh​

Answers

Answer:

Abacus many be built first in China

Explanation:

I know Abacus ^o^

Answer:

Hewo There!!!!

__________________

China- i thinkkk maybe?

__________________

“Hold fast to dreams,

For if dreams die

Life is a broken-winged bird,

That cannot fly.”

― Langston Hughes

__________________

Think of life as a mytery because well it sort of is! You don't know what may happen may be good or bad but be a little curious and get ready for whatever comes your way!! ~Ashlynn

(a) Explain what the following Java components are used for.JListJFrameFLowLayoutJpanelJFrameEventListener(b) Write simple Java codes to illustrate how each one of the above components are implemented.​

Answers

Answer:

Welcome to Gboard clipboard, any text you copy will be saved here.

Suppose a password must have at least 8, but no more than 12 characters, where each character can be either:

Answers

Answer:

A combination of uppercase letters, lower case letters, numbers, and special characters.

Explanation:

A password is a word that permit you to register, log or sign in a site.

An input statement is used to interact with the user of a program.
True False

Answers

Answer:

True.

Explanation:

An input statement asks a user a question, where the user has to input a value for the program to move forward. This means that yes, the program does interact with the user.

In transcription Files are transcribed in:

a) Australian English
b) American English unless a client states otherwise.
c) Canadian English
d) British English

Answers

Answer:

B

Explanation:

American English unless a client states otherwise

Answer:

b american english

Explanation:

Other Questions
what is an equation in slope-intercept form for the line (-5, 2) and (5,-3)? Describe the graph. y=12x+2Group of answer choicesHorizontal line that goes through the point (0,2).Vertical line that goes through the point (2,0).A line that goes through the point (0,2) that goes up one unit for every two units moving right.A line that goes through the point (2,0) that goes up one unit for every two units moving right. Find the difference between the lengths of the longest and shortest sides of a rectangle if its area is 924 square milimetres and its perimeter is 122 milimetres. What do you think is the most serious threat to the American way of life? Can you use cheetahs to represent Photosynthesis or Cellular Respiration? What makes solids, liquids, and gases different. Explain the hypothesis, prediction and experiments that can lead to scientific theory. Read each question below. Then, using the drop-down menus, decide if it represents the purpose, construction, or support aspect of choosing a website host.Will the website be built by a programmer at a company?What type of content will be on the website?Will the website be used to share family pictures or as a professional site for posting news?Will customers be making secure transactions on the website?How extensive of a control panel, or location of login and website control, will be needed? 6. What does this line suggest? "But you still threw me out of your system." * The 6th term of the geometric sequence is 1/128. The common ratio is 1/2. Find the 9th term of the sequence 1/1281/2561/5121/1024 Which expression shows a way to find 22 X 46? florida sales tax is 7%. How much money comes out of your pocket if u buy something for $100 After World War II, many wondered how peace could be guaranteed. For politicians,intellectuals, and other observers, what was the answer? -2/9 (-5/3) I Ready Multiply and Divide Rationals. Why was the American Federation ofLabor a different type of labor union(compared to the Knights of Labor)and why did it grow during the 20thcentury? Sort the Chart Tools options under the tab where they are located. patrick had 144 coins in his collection of nickels and quarters. If the coins have a total value of $20, how many are nickels and how many are quarters? What is the most likely reason the author wrote the tale of the hummingbird The melody of a song is notated on a:keystaff.space.line. PLEASE HURRY. WILL GIVE BRAINLIEST. 100pts I NEED HELP PLEASE will give crown