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

What is a doctor called who specializes in the treatment of heart conditions?
solve 3(z + 1) + 11 < –2(z + 13)
Dave is painting a wall in his living room a bright red color. so far, he has painted 1/5 of the wall and has used 1/2 gallon of paint. how many gallons of pain
divide (x^2-16/x-1)/x+4
How did advancements in technology make blitzkrieg possible during World War II?
write as a power of 8 [tex]8 {}^{30} \div 8 {}^{6} [/tex]
which of the following liquids is most soluble in water benzene ethanol carbon tetrachloride toluene
Write the mechanism of the reaction of methyl benzoate to form methyl 2-nitrobenzoate.
The graph shows the number of hours of daylight in a city for a little over two years. What is the period of this curve? A) 9 B) 15 C) 350 D) 700
Evaluate the following expression. Round your answer two decimal places. Log9 7