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

Which is a method used with arrays? find index insert sort
A snake slithers 25 km toward its prey in 30 minutes. what is the average speed (in km/hr) of the snake?
During the Great War, women also contributed to the war's victory by
PLEASE HELP x + y = 90 a. Write the equation in slope-intercept form. b. Graph the equation. c. Use the graph to find the value of y if x = 30
Jim needs to rent a car. A rental company charges $21 per day to rent a car plus $0.80 per mile driven. How many miles can he drive in a day if he wants to spen
13. Find the least common multiple (LCM) of 28 and 63.
Find the circumference of the circle.
What type of rock is primarily the cause of sinkholes? a. granite b. marble c. limestone d. igneous
¿Por qué la Ilustración es considerado un movimiento ideológico, racionalista, crítico, filosófico, literario y científico?
What do you like about Georgia O'keeffe work?