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 the table of the function contains exactly two potential turning points, one with an input value of –1, which statement best describes all possible values o
If EC bisects Find BED
Which number classified as a terminating decimal number? A)0.3214... B)0.25313 C)0.125739 D)none of the above
The average number of children that a woman has over her lifetime is called the _______.
what does percentage means
Discovery of the atomic bomb was partially based on his studies. (A) Marie Curie (B) Albert Einstein (C) John Dalton (D) August Weismann
Bluetooth is a common wireless protocol used to make pan connections. a. True b. False
Find the value of a. A. 36 B. 144 C. 54 D. 126
The vertices of quadrilateral PQRS are P(4, 5), Q(6, 6), R(9, 4), and S(7, 2). Write a paragraph proof to determine whether quadrilateral PQRS is a parallelogr
what is 7x-2= [tex]7x - 2 = 11x - 34[/tex]11x-34