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

Yugoslavia is now made up of _______ and Montengro.. Serbia Croatia Albania
perimeter of a square painting is 216 centimeters. How long is each side?
are all multiples of 8 also multiples of 2
what is 1600 square yards ratio 3:5
why was embalming important to egyptians?
i need to solve: -3(8x); x = 1/4. Using substitution ro find the value of expression
|3w+6|=9 Solve for w
Yugoslavia is now made up of _______ and Montengro.. Serbia Croatia Albania
The Nuclear Non-Proliferation Treaty went into effect beginning in 1970 for a period of 25 years. In 1995, an international conference __________.
Rani bought 9 similar notebooks she gave the cashier $10 and received change of $5.05 what was the cost of 1 notebook