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

The first amendment protects the right to bear arms
Which state became the first to allow women the right to vote when it was admitted to the union in 1890? a. new york b. new jersey c. utah d. wyoming
how would you convert 5 decades to months
Prime factorization of 147
One number exceeds another by 44. the sum of the numbers is 24. what are the​ numbers?
A rectangle is 8 cm longer than twice the width. the perimeter of the rectangle is 88 cm. find the dimensions of the rectangle.
A rectangle is 8 cm longer than twice the width. the perimeter of the rectangle is 88 cm. find the dimensions of the rectangle.
When a substance such as ice melts, its temperature increases. Describe what happens to the arrangement of the water molecules as the temperature increases. A)
An equation that is true when y=-0.5
a=bh a=24 h=4 how do i slove for b