Questions
Write a C++ program that will make changes in the list of strings by modifying its...

Write a C++ program that will make changes in the list of strings by modifying its last element.

Your program should have two functions:

1. To change the last element in the list in place. That means, without taking the last element from the list and inserting a new element with the new value.

2. To compare, you need also to write a second function that will change the last element in the list by removing it first, and inserting a new element with the new value.

The main creates the list, creates the string variables, populates few elements in the list (couple is enough) and calls the functions to modify the list. After each call to the functions, the main should print out the value of the last element in the list, so the changes are visible. Again, you print the last element not from within the functions, but from the main.

Note 1: You will need to use references to implement the in-place requirement.

Note 2: However difficult that assignment may look like, all information you need on how to work with the list is given to you in the lecture and both your functions implementation are just very few short statements (hint: If you find yourself writing 5 or more lines of codes for each function, you probably do it wrong).

Please Describe all variables and important sections of code.

Need a screenshot of the out put.

In: Computer Science

An electric eel develops a potential difference of 500 V, driving a current of 0.90 A for a 1.0 ms pulse.

An electric eel develops a potential difference of 500 V, driving a current of 0.90 A for a 1.0 ms pulse.
A.Find the power of this pulse.
B. Find the total energy of this pulse.
C.Find the total charge that flows during the pulse.

In: Physics

When light of wavelength 400 nm is incident on a metal surface, the stopping potential of...

When light of wavelength 400 nm is incident on a metal surface, the stopping
potential of the photoelectrons is 0.600 V.
a. What is the work function of the metal?
b. What is the threshold frequency?
c. What is the maximum kinetic energy of the electron?

In: Physics

A proton (H+) is released at rest at a location where the electric potential is measured...

A proton (H+) is released at rest at a location where the electric potential is measured to be 3000 V.

The energy gained by the proton = _________ J BLANK-1 = __________ eV BLANK-2

The speed gained by the proton due to this potential is ______ m/s?

In: Physics

When 210 nm light falls on a metal, the current through a photoelectric circuit is brought...

When 210 nm light falls on a metal, the current through a photoelectric circuit is brought to zero at a stopping voltage of 1.54 V . What is the work function of the metal? Express your answer using three significant figures.

In: Physics

Prove or disprove: two consecutive rotations about two different axis are commutative. That is, is RuRv...

Prove or disprove: two consecutive rotations about two different axis are commutative. That is, is RuRv = RvRu? (Hint: For simplicity, you can assume that the axis u is the x-axis and v is the y-axis without loss of gnerality).

In: Advanced Math

Using identities for time derivatives and del operators, show that the solution of the inhomogeneous wave...

Using identities for time derivatives and del operators, show that the solution of the inhomogeneous wave equation for the potential V given by the Lorentz gauge (the expression containing an integral over volume), does indeed satisfy the inhomogeneous wave equation.

In: Physics

A small generator produces 2.4 V of peak emf. If it contains a 0.050-T permanent magnet...

A small generator produces 2.4 V of peak emf. If it contains a 0.050-T permanent magnet and 96 wire loops, each of which is roughly a 6.0-cm diameter circle, at what frequency does the generator rotate?

In: Physics

In a differential amplifier, the noninverting input is 3 cos (600t + 45◦) mV and the...

In a differential amplifier, the noninverting input is 3 cos (600t + 45◦) mV and the inverting input is 4cos (600t - 45◦) mV. The output is


vo = 3cos (600t + 45◦) + 4.004cos (600t - 45◦) V. The CMRR is_____ dB.

In: Electrical Engineering

Briefly describe the following concepts/principles/items, use appropriate diagrams/equations/formulas/examples if needed:                 i.      &nb

Briefly describe the following concepts/principles/items, use appropriate diagrams/equations/formulas/examples if needed:

                i.          Gaussian curve

               ii.          Coefficient of variation

              iii.          Confident interval

             iv. Q test

               v.          Dialysis

In: Statistics and Probability