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
Can someone refresh me regarding interval notation in regards to domain and range?
Dmitrij [34]
I can! What problem do u need help on
6 0
4 years ago
Which if the following summation notations represent this series?
kati45 [8]

Answer:

E.

Step-by-step explanation:

Let's look at the sequence:

3,8,13,\cdots

The sequence has a common difference. We say it has a common difference because 8-3 has the same value as 13-8.

The common difference is what these differences are equal which is 5.

The sequence is therefore linear or arithmetic (same thing).

So it has form y=mx+b where the slope/common difference is 5.

y=5x+b

We need to find the y-intercept b.

The list of points is related to the above sequence:

(x,y)

(1,3)

(2,8)

(3,13)

I only need one of these points to find b.

Let's use the first one since it has smallest numbers and I don't wish to use the calculator unless I really have to.

y=5x+b with (x,y)=(1,3):

3=5(1)+b

3=5+b

Subtract 5 on both sides:

3-5=b

-2=b

So the equation for the set of points is:

y=5x-2

Now they are using i instead of x[/tex]:

a_i=5i-2

Since all summations begin at i=1, then the choices are done to either choice C and choice E.

I need to find how many terms are in the given series. The last number is 33. So what term number is associated with the value 33.

a_i=5i-2

33=5i-2

Add 2 on both sides:

35=5i

Divide both sides by 5:

\frac{35}{5}=i

7=i

So there are 7 terms and the 7th term is 33.

So the answer is choice E.

5 0
4 years ago
A boat travels 224 miles upstream in 8 hours. The next day it returns the same distance in 7 hours. Assuming the current remaine
amid [387]

Answer:

Try dividing

Step-by-step explanation:

yes

3 0
3 years ago
Find the area of the parallelogram.
zhenek [66]

Answer:

To find the area of a parallelogram, multiply the base by the height. The formula is: A = B * H where B is the base, H is the height, and * means multiply

Step-by-step explanation:

6 0
3 years ago
Slope of the line<br> (5,11) (-5,-1)
AnnZ [28]

Answer:

1.8

Step-by-step explanation:

To do this, you need the slope formula

y^2 - y^1   over

x^2  - x^1

x^1     y^2           x^2     x^1

( 5,     11)             (-5         -1)

-7 - 11  =  -18

-5 -5   =  -10   (divide)  = 1.8

4 0
3 years ago
Read 2 more answers
Other questions:
  • 18 POINTS!!!!! A box-and-whisker plot. The number line goes from 1 to 15. The whiskers range from 1 to 14, and the box ranges fr
    15·2 answers
  • I'll GIVE BRANLIEST!!!!!An architect is using 3-D modeling software to help design a new business tower to be constructed on a s
    15·2 answers
  • What is this answer I dont know most of it
    10·1 answer
  • ASAP PLEASE
    8·1 answer
  • Plssss help meee I suck at math
    15·1 answer
  • -12,60,-300,1500 what are the next two number s
    9·2 answers
  • Round 19,805 to the indicated place.
    6·2 answers
  • How is the product of 3 and –2 shown using integer tiles? A.)3 positive tiles and 2 negative tiles. B.)3 negative tiles and 2 po
    9·2 answers
  • Convert the angle 0=228 degrees to radians
    15·1 answer
  • Can anyone please answer the probability questions?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!