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

A number and 9 is Equal to 13
What is the method of bringing water to dry land called?
show steps how to divide 1000 by 350
what is100 10 times as much as 1/10
Is the digit in hundreds place 1/10 the value of the digit in the thousands place 8556
Difference between vertebrate and invertebrate?
Which could be considered an act indicating acceptance of the social contract? A. using electricity B. watching network news broadcasts C. driving on the highwa
Jenny is running for more than an hour on a pleasant sunny morning. Her body is sweating to maintain homeostasis, which is caused by the action of a/an
How do you know when a term is defined or undefined
how long will it take you to drive 135 miles at the speed of 45 miles per hour