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
How do you multiply 2/3 and n?
adoni [48]
I believe the answer is 2/3n
6 0
4 years ago
Read 2 more answers
A few weeks into the deadly SARS (Severe Acute Respiratory Syndrome) epidemic in 2003, the number of cases was increasing by abo
DaniilM [7]

Answer: The required exponential model is 1804(1.04)^t

Step-by-step explanation:

Since we have given that

Initial cases = 1804

Rate of growth = 4%

Since it is increasing exponentially,

So, it becomes,

A=ab^t

Here, a = 1804

b = 1+r=1+0.04=1.04

So, it becomes,

A=1804(1.04)^t

Hence, the required exponential model is 1804(1.04)^t

6 0
3 years ago
What is the value of x?<br>x=____​
Setler79 [48]
The answer is x = 6

To solve this you would use the pythagorean theorem which is a^2 + b^2 = c^2

In this problem a = x b = 8 and c = 10

You would then square these numbers
x^2 + 64 = 100

Next, you would subtract 64 from both sides.

x^2 = 36

All that’s left is the find the square root, which is x = 6.

So, therefore, you’re answer is x = 6
6 0
3 years ago
In this triangle, what is the value of x?
nalin [4]

Answer: x=56.5\ km

Step-by-step explanation:

Given the right triangle in the image, you need to remember the following identity:

cos\alpha=\frac{adjacent}{hypotenuse}

Observe the triangle. You can identify that:

\alpha=28\°\\adjacent=x\\hypotenuse=64

Then, knowing these values, you can substitute them into  cos\alpha=\frac{adjacent}{hypotenuse}:

cos(28\°)=\frac{x}{64}

Finally, you have to solve for "x".

Therefore, the value of "x" rounded to the nearest tenth is:

64*cos(28\°)=x\\x=56.5\ km

8 0
3 years ago
Write an equation of the line. (5 Points)​
Aleks [24]
Y=6x+6 !! enjoy your dayy
7 0
3 years ago
Read 2 more answers
Other questions:
  • There are 25 servings in a 30.2-ounce jar of peanut butter. how many ounces are there in 1 serving?
    15·1 answer
  • Patrick earns $40 per hour. He earned an extra $1000 for working on a special project. His pay check for the month was 7420. How
    8·2 answers
  • Use De Morgan's laws to write an equivalent statement for the sentence. The bus does not have an engine or the people do not hav
    9·1 answer
  • What is the value of the underlined digit 1,711,799.
    5·1 answer
  • F(x) = 2x + 6, and g(x) = x2 + 6, find (g ○ f)(1)
    6·2 answers
  • Whers is the place in ur house that ur ferret hides ur keys the most often
    6·1 answer
  • Simplify!! Extra points for explanation!!<br> Just choose number 1 2 3 or 4 please!!
    10·1 answer
  • HELPPPPPPP LOOK AT THESE PICS PLS GEOMETRY
    9·1 answer
  • Find angle &lt;QPS in the diagram​
    9·1 answer
  • A rectangle has a side length of two and seven eighths feet and a side width of 5 feet. What is the area of the rectangle?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!