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
9x + 20y = 109x + 20y = 109x + 20y = 109x + 20y = 109x + 20y = 109x + 20y = 109x + 20y = 109x + 20y = 109x + 20y = 109x + 20y =
sleet_krkn [62]
9x + 20y = 109x + 20y

9x = 109x

109x - 9x = 0

100x = 0

x = 0
6 0
3 years ago
How can I use number patterns to find the lcm of 120 and 360
SashulF [63]
You can use number patterns to find the LCM of 120 and 360 by multiplying 120 by 1,2,3,4,5,6,and so on and do the same with 360 until you find the least number that they have in common.
3 0
3 years ago
HELPPP!! SEEE PHOTOOO
AnnyKZ [126]

Answer:

angle s = 22

angle r = 117

angle q = 41

Step-by-step explanation:

so all of the angles equal to 180 degrees in a triangle

so you add all of t he angles like this:

x+5x+7x+2x-3=180

collect all of the like terms,

8x + 4 = 180

subtract 4 from both sides, which leaves you with 8x = 176

divide both sides by 8 leaving x on its own.

x = 22

angle s = 22

angle r = (5x22)+7 which is 117

angles q = (2x22)-3 which is 41

3 0
2 years ago
An insect is 3.5 millimeters long. Which expression finds the length of the insect in decimeters
Anit [1.1K]

As 1 mm = 0.01 dm

3.5 mm = 0.01*3.5 = 0.035 decimeter

5 0
4 years ago
Read 2 more answers
I really need help with this.
Strike441 [17]

Answer:

What?

Step-by-step explanation:

What do u need help with

3 0
4 years ago
Other questions:
  • In a walk fir charity,you. Walk at a rate of 100 meters per minute.how long does it take you to walk 2 kilometers
    9·1 answer
  • Find s25 for 3 + 7 + 11 + 15
    11·1 answer
  • Juan and Ari went to the farmers market to buy fruit. Juan’s bag of apples that he bought weighed 31/7 pounds. Ari’s bag of oran
    8·2 answers
  • What is 50 times 10 with the power of 4
    10·2 answers
  • Graph the following linear equation. y=-5/2x+10
    14·1 answer
  • Hi. Please help me write a equation for this graph.
    5·1 answer
  • Simplify 38 over 49 what’s the anwswer
    5·2 answers
  • Round 19912660 to the nearest million
    10·1 answer
  • The circumference of a circle is 57 cm. What is the area of the circle? 0 257 cm 0 107 cm? O 6.257 cm2 0 2.57 cm2​
    12·1 answer
  • 1.1 The results, as percentages, of the National Senior Certificate examination obtained by a group of home-schooled Grade 12's
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!