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

I need help with 13 pls.
Describe and analyze the experience of the great depression between the industrial nations and the primary producing nations. What parts of the world were most
business opportunities in neighboring Georgia, Armenia, Iran, Iraq, and Syria. Yet Ericsson, the Swedish telecommunications manufacturer with the largest market
White and black shapes are used in a game Some of the shapes are circles All the other shapes are squares The ratio of white to black shapes is 5:11 The ration
Y = 2x + 5 and 3x + y = 40
Uma makes a scale drawing of a patio. The drawing below shows the two scales she used to plan two patios of different sizes. Scale 1: 1 centimeter = 3 meters. S
Suppose the rent for an apartment is $9,000 for the first year. The rent is expected to increase by $1,200 each year, and the apartment will be rented for five
Help please 19 through 23​
Janiszewski and Uy (2008) conducted an experiment in which they had 43 participants read 10 scenarios. In this study, the researchers wanted to determine the im
317,081 in expanded form