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
A basketball team sells tickets that costs $10, $20, or, for VIP seats $30. The team has sold 3188 tickets overall. It has sold
Drupady [299]
490 tickets is 1,230
8 0
3 years ago
Use the diagram to complete the table by matching the Theorem with the angle relationship.
serious [3.7K]

Answer:

The Table with Correct reasons are as follows.

Step-by-step explanation:

The Table with Correct reasons are as follows

       Answer                                                  Angle Relationship

c. Corresponding Angles                       ∠ 1 ≅ ∠ 5

d. Same Side Interior                             ∠ 4 + ∠ 5 = 180

a. Alternate Exterior Angles                    ∠ 3 ≅ ∠ 6

b. Alternate Interior Angles                    ∠ 4 ≅ ∠ 5

c. Corresponding Angles                       ∠ 2 ≅ ∠ 6

6 0
3 years ago
Why do you change the sign when subtracting a negative number?
natulia [17]
This is because minus times minus is equals plus so the sign must change

5 0
3 years ago
Read 2 more answers
This so fking confusing
love history [14]

Answer:

m

Step-by-step explanation:

m

8 0
3 years ago
Read 2 more answers
Brittany is making hair bows to sell at a craft show. Each hair bow requires 3/4 yard of ribbon. Brittany plans to make 50 bows.
uranmaximum [27]
A. 50 x (3/4) = 37.5
6 0
3 years ago
Other questions:
  • Sarah has 132 pennies she gives 58 away how much does she have left
    5·2 answers
  • Mr. Williams physical education class is 7/8 hour. How many minutes are spent warming up and cooling down if these two together
    6·1 answer
  • Write the point-slope equation for each line with the given slope and point. y –y1 = m(x – x1) Slope = 5 Point on line = (–1, 3)
    6·1 answer
  • The sum of two numbers is −4. If one number is subtracted from the​ other, their difference is 2. Find the numbers.
    12·1 answer
  • A group consisted of 2 girls for every boy. 24 more girls joined the group. There are now 5 girls for every boy. How many boys a
    5·2 answers
  • With one mighty swipe of his sword, the knight cut off the flying dragon's head. If the dragon's head weighed 56.7 kg, how much
    9·1 answer
  • Mr de guzman bought 7 1/2 of meat.He used 2 3/4 for afritada,3 1/8 kg for menudo and the rest for pochero.How many kilograms of
    5·1 answer
  • Josh allowance is m cents per week. Represent the number of dollars he gets in a year.
    10·2 answers
  • Which two intergers is
    15·1 answer
  • Simplify problem....​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!