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

Choose the two equations you would use to solve the absolute value equation below. Then solve the two equations.|x + 5| = 55
How do decomposers interact with their ecosystem.
What r all the admenments
David works at the T-Shirt Shack selling tees. The equation y = 15x - 520 represents the profit that the T- Shirt Shack makes for each T - Shirt sold where y is
Whose statement makes sense? Who's statement is nonsense? Explain your reasoning. Gavin: There is no multiple of 1/6 between 3/6 and 4/6. Abigail: 4/5 is a mu
what did medieval people know about the world
Is 3/10 closer to 0,1/2 or 1
X^2+5x-104=0 solve quadratic equations
Why does a bullet have more kinetic energy than the recoiling rifle
Round the following to the nearest cent: $16.997