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
luda_lava [24]
3 years ago
10

Assume that the function call operator() is overloaded for data type String in the usual sense of selecting a substring from a l

arger string. For a String object string 1 with the character string "ABCDEFGHI", what string does string 1( 4 , 2 ) return
a. "CDEF".
b. "CD".
c. "EFGHI".
d. "EF".
Mathematics
1 answer:
krek1111 [17]3 years ago
6 0

Answer:

"EF"

Step-by-step explanation:

Given

String1 = "ABCDEFGHI"

Substring : String1(4,2)

To solve this, one must understand the following

1. The function call operator () is used to overload objects of class type.

2. A copy constructor must receive its argument by reference to prevent an otherwise infinite recursion.

3. overload ( ), doesn't mean that one is not creating a new way to call a function; instead, it is a way to create an operator function that can be passed an arbitrary number of parameters

Having pointed out this,

The string to overload goes thus

String1 = "ABCDEFGHI"

The parameters goes thus

String1(4,2)

To represent this properly, we have

("ABCDEFGHI",4,2)

Which means to return 2 strings starting from the 4th index character.

It should be noted that index starts at 0.

So, the character at the 4th index is "E"

Then, we count 2 characters starting from E (i.e. E, inclusive)

This gives

"EF"

So, the returned string is "EF"

You might be interested in
Simplify 4(b-6)+19 ?
Digiron [165]

Answer:

4b -5

Step-by-step explanation:

Perform the indicated multiplication first:  4b - 24 + 19.  Next, combine like terms, obtaining 4b -5 (answer)

4 0
3 years ago
sally decided she wanted homework help. no one gave it to her. if over 100 people were on the app to help and 1 person helped ho
olga2289 [7]

Answer:

thats so deep

<em>i</em><em> </em><em>see</em><em> </em><em>where</em><em> </em><em>you</em><em> </em><em>are</em><em> </em><em>coming</em><em> </em><em>from</em><em> </em><em>and</em><em> </em><em>i</em><em> </em><em>see</em><em> </em><em>ur</em><em> </em><em>point</em>

<em>ppljust</em><em> </em><em>need</em><em> </em><em>to</em><em> </em><em>stop</em><em> </em><em>being</em><em> </em><em>selfish</em><em> </em><em>an</em><em> </em><em>helo</em><em> </em><em>eachother</em><em> </em><em>wetre</em><em> </em><em>in</em><em> </em><em>a</em><em> </em><em>pandemic</em><em> </em><em>for</em><em> </em><em>christs</em><em> </em><em>sake</em>

7 0
3 years ago
Read 2 more answers
Here are the 30 best lifetime baseball batting averages of all time, arranged in order from lowest to highest:
hichkok12 [17]

Answer:

D

Step-by-step explanation:

0.36|6=0.366

8 0
3 years ago
Im only have 10 minutes please. Is math​
alukav5142 [94]
Answer: A
Explanation do Pythagorean theorem and find the third side. Then do adjacent/hypotenuse.
7 0
2 years ago
Read 2 more answers
I need to determine each angles measure. M 4<br><br> M 6
Ulleksa [173]
By geometrical inspection we have:
 M4 = 30
 Then the angle M6 can be determined from the fact that you have a rectangle triangle (345) that has an angle of 90 and another of 30. The missing angle measures:
 180-90-30 = 60 = M3
 Then to find M6 we have
 M3 + 60 + M6 = 180
 M6 = 180-60-M3
 M6 = 180-60-60
 M6 = 60
 answer:
 M4 = 30
 M6 = 60
7 0
3 years ago
Other questions:
  • What is FB? Please Explain the steps to find it.
    14·1 answer
  • A student's cell phone plan has a monthly charge of $40 for 600 minutes of use and a $0.25/minute charge for each additional min
    13·1 answer
  • 12. Find the area of a circle with a radius of 5 meters. Use t = 3.14.
    9·2 answers
  • 1.875 divided by 500 word problems
    12·1 answer
  • Solve the system by using elementary row operations on the equations. Follow the systematic elimination procedure.
    15·1 answer
  • 7.1 in.
    6·1 answer
  • In the diagram below, points A, E, and F lie on the same line. If ABCDE is a regular pentagon, and \angle EFD=90^\circ, then how
    9·1 answer
  • Help me free brainleist if you help
    14·1 answer
  • Eight less than a number is 19 __________
    5·2 answers
  • 2.6 m wide. What's the area of a<br> single panel?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!