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
Find three consecutive odd integers such that the
DiKsa [7]

Answer:

Step-by-step explanation:

n, n+2, n+4

2(n+2)-n=11

2n+4-n=11

n+4=11

n=7

So the three consecutive odd terms are 7, 9, 11.

5 0
3 years ago
PLEASE HELP
slava [35]

Answer:

\log(24)

Step-by-step explanation:

\log(8)+\log(3)=\log(8*3)=\log(24)

5 0
2 years ago
Which answer is the correct form of bar notation for this decimal number: 4.676767…
Rudiy27
Hello There!

Well all of your answer options are the same so i suppose they are all right.

Hope This Helps You!
Good Luck :)
4 0
4 years ago
Read 2 more answers
Write the equation in slope intercept form. what are the slope and y-intercept?
Leno4ka [110]
Slope intercept is basically solve for y
y=mx+b
m=slope
b=yintercept

-3x-10y=7
add 3x to both sides
-10y=3x+7
divide both sides by -10
y=-3/10x-7/10

slope is -3/10
yintercept is -7/10 or at point (0,-7/10)
5 0
3 years ago
To the nearest dollar, what does the analyst believe
ruslelena [56]

The analyst believes the value of the stock at the end of three weeks will be $134.

<h3>What are stocks?</h3>
  • Stock (also known as capital stock) in finance refers to the shares of ownership in a corporation or company.
  • A single share of stock represents fractional ownership of the corporation based on the total number of shares.
  • This typically entitles the shareholder (stockholder) to that fraction of the company's earnings, proceeds from asset liquidation (after discharge of all senior claims such as secured and unsecured debt),  or voting power, which are often divided in proportion to the amount of money invested by each stockholder.

To find the value of the stock:

  • Because the stock price drops by 28% every week, it will be:
  • 100 - 28 = 72% every week.
  • So, r = 0.72.
  • Then, the equation V = 360(r)∧t will be V = 360(0.72)∧t .
  • After 3 weeks, V = 360(0.72)³ = 134.47 = 134

Therefore, the analyst believes the value of the stock at the end of three weeks will be $134.

Know more about stocks here:

brainly.com/question/690070

#SPJ4

The correct question is given below:

To the nearest dollar, what does the analyst believe the value of the stock will be at the end of three weeks? (Note: Disregard the $ sign when gridding your answer.)

3 0
2 years ago
Other questions:
  • Solve for y in the equation 4y+15=-5y+9<br> a)-6<br> b) -2/3<br> c)2/3<br> d)6
    14·2 answers
  • If 3^x = 54, then which of the following must be true?
    12·1 answer
  • What is the probability that you will get a 3-digit combination correct if no digits in the combination can be repeated?
    7·2 answers
  • How many times does 9 go into 143
    11·1 answer
  • 3. Make a conjecture. Which
    8·2 answers
  • What is and why 41/2+31/4=
    9·2 answers
  • PLS HELP PUT #BRAINLIEST IF YOU WANT IT
    10·2 answers
  • What is the value of the expression a2 + b3 when a= 1/3 and b= 1/2 ?
    13·1 answer
  • Out of 12 pets that visited the vet, 10 had a flea problem. Out of 36 pets, how many had flea problems?
    8·1 answer
  • Explain how to use a model to represent the division of two fractions.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!