Ask your own question, for FREE!
Computer Science 8 Online
kekeman:

Which data structure is best suited to store the length of a string? Boolean Integer List String

Vocaloid:

key word: *length* of a string, a.k.a how many characters it has. with that in mind, what do you think?

Vocaloid:

the length of a string will be a single positive (or 0) whole number. which data type from the list is closest to this idea?

kekeman:

List?

Vocaloid:

eview data types when you get a chance lists would be better if you need to store lots of values at once for a single whole number, integer is the best data type

kekeman:

Hmmm so it would be an Integer?

Vocaloid:

yes

kekeman:

Because a integer is a number data type that is any positive or negative whole number, including 0

Vocaloid:

yup

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!