ibbibhat4381 ibbibhat4381
  • 16-12-2017
  • Computers and Technology
contestada

When subscripts are used to specify character positions in a string, the last character subscript is the same as the string's length?

Respuesta :

tonb
tonb tonb
  • 18-12-2017
Not true. If I would store the text "ABC" the subscripts would be:

buffer[0] == 'A'
buffer[1] == 'B'
buffer[2] == 'C'

As you can see, subscript 2 points to the last character, yet the length is 3.
Answer Link

Otras preguntas

Genetic drift is best described as evolution as a result of nonrandom mating environmental variance natural selection random chance within the population
HELPZZZZZZZZZZZ PLZZZZZZZZZZZZZZ!!!!!!!
Poverty is a persistent problem in nearly every human society. in the united states, it is usually thought of as a condition of deprivation due to economic circ
Where are the asymptotes for the following function located? f(x)=14/(x-5)(x+1) a. x=-1 and x=5 b. x=-1 and x=14 c. x=1 and x=-5 d. x=14 and x=5
HAS ANYONE READ "THE OPEN BOAT" BY STEPHEN CRANE??
The "War Hawks" were:
Solve for x: 3/4x+5/8=4x x = __________________ Write your answer as a fraction in simplest form. Use the "/" symbol for the fraction bar.
Good conductors must a. resist neutron flow. b. readily accept electron flow. c. readily accept neutron flow. d. resist electron flow.
How did Iroquois women influence the men on the Iroquois League council?
In the u.s., if a consumer finds a problem on her credit report, she must first send a letter to the credit-reporting agency. under federal law, how many days d