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

Seven years ago, Richard was 2/5 his father's age. Richard's father is now 47 years old. How old is Richard now?
This question has two parts. First, answer Part A. Then, answer Part B. Part A Fill in the blank question. Cassie wants to purchase a pair of binoculars that is
4. What are some things that can happen if the president uses a 'pocket veto
help me plz I need it
Using the GCF you found in Part b re write 35 +63 factor one factor is the GCF and the other is the sum of the two numbers that do not have a common factor sho
summary of 'cat' poem which is written by Eleanor farjeon​
a. Do you think sodium carbonate is an acid or a base, and why? (2 points)
Evaluate whether each value makes a true or false statement.
which characteristic of a wire its CSA based on
Direction :Circle the pronouns and draw an arrow to the noun to which refers