rajorshichowdhuri071 rajorshichowdhuri071
  • 24-08-2020
  • Computers and Technology
contestada

Write statementsto show how finding the length of a character array char [ ] differs from finding the length of a String object str.

Respuesta :

tonb
tonb tonb
  • 24-08-2020

Answer:

Length of char array: sizeof(arr)

Length of a string object: myString.length()

Explanation:

The sizeof approach is generally not recommended, since this information is lost as soon as you pass the array to a function, because then it becomes a pointer to the first element.

Answer Link

Otras preguntas

in the early 1900s progressive era reformers sought to increase citizen participation in government by supporting the...1] expansion of the spoils system2] dire
How has the War affected Leon,Eugene,and Andrew ?
how do you do substitution
A student notices that an inflated balloon gets larger when it is warmed by a lamp. Which best describes the mass of the balloon as a result of this change?   A
what did god give to moses on mount sinai
Are there any poisonous animals in Washington State?
in the early 1900s progressive era reformers sought to increase citizen participation in government by supporting the...1] expansion of the spoils system2] dire
when di voyagers 1 and 2 (u.s crafts) , leave for Jupiter, Saturn, Uranus,and neptune
one car travels east for 360 m over a period of 15 seconds. a second car travels west for 120 m over a period of 5 seconds. what is true about their speeds? the
joseph had a quarter of a cookie. ellen had a half of a different cookie. The peice joseph had was larger. how could ellens peice be smaller? explain.