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

Please help? Simplify:
Which statement is always true for a square, but not always true for a rhombus? - Two angles are obtuse. - All sides are equal. - Two or more angles are ri
Please help? Simplify:
Which of the following expression is equivalent to sin(5x) ? a. sin(3x) cos(2x) + cos(4x) sin(x) b. sin(4x) cos(x) - cos(4x) sin(x) c. sin(3x) sin(2x) + cos(3x)
funny speech topics < tamil speech >
What if a wave reaches a type of matter it cannot pass through? Does it just stop moving? If not, where does it go?
If a leaf branch of a healthy potted plant is covered a polythene bag tiny water droplets are seen .why does this happen ? Which part of the leaf is responsible
what is the hybridised structure of B2H6?
A fair coin is tossed 100 times. What is the probability that more than 55 heads are observed?
An AHA peeling solution has PH of 3.83 What would be the percentage of available acid ……and the percentage of salt….