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 the value of y?
What reptilian taxon is extant (has at least some members that are still living; opposite of extinct)
Help help help math math math
If the coordinates of one vertex of a triangle is (-4,-1), what will be the its new coordinates if the triangle slides 6 units to the right?.
Complete each sentence with the correct preterite form of the verb in parentheses. 1. ¿Qué profesión (preferir) tú? 2. Los exámenes (ser) muy difíciles. 3. El f
I WILL GIVE 30 POINTS TO THOSE WHO FILL IN THE BLANK
Select a word from the Word Bank to correctly complete each statement. Alderdale Indian strange China main true story conditions vocabularies robber three Pap
CAN SOMEONE HELP ME ASAP PLEASE !!!!!
The weather broadcast gives us ________________ about how the weather is going to be. 1. the informations2.informations3.information4.an information​
-Write a real-world situation that could be represented by the equation 12.5x + 30 = -7.5x + 90.5. What does the variable represent?​