piperswatson5742 piperswatson5742
  • 21-01-2021
  • Computers and Technology
contestada

A string is represented as an array of characters. If you need to store an array of 5 strings with the maximum length of a string is 100, how would you declare it

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 22-01-2021

Answer:

char str[5][100]

Explanation:

See attachment for options:

From the options, we can see that the programming language is C language.

The syntax to store an array of m strings with a maximum of n elements in C is:

char array-name[m][n]

In this case:

[tex]m = 5[/tex] --- Number of strings in the array

[tex]n = 100[/tex] --- Maximum character in each string

Assume the array name is str, the syntax can be expressed as:

char str[5][100]

Ver imagen MrRoyal
Answer Link

Otras preguntas

if equation for the straight line passing through the point (-2; 3 ) and (- 3; 2)
special name given to angles greater than 180 but less than 360
How did a warming climate 12,000 to 10,000 years ago impact the Paleo-Indians living in the Americaas at the time?
Is violence ever an appropriate solution for resolving conflict. You can restate the question and answer yes or no and why? Please answer quick
what is the answer for number 9 and 10
what does -6y=18 equal
A culture is grown with a population of 45 million cells. The cell population is found to double every hour. What will the population be after four hours?
a solution of HCI has [H+]=0.01M. What is the ph
A train whistle is at a higher pitch (note) as it approaches you and then drops to a lower pitch as it moves away. This effect is called?
How do roots get sunshine?