Is it possible for me to randomize a word?

Hello everyone. I need a few advices here.

  1. Can I randomize the word? e.g. I have bananas, oranges, pineapples. and i want random 1 out of 3 i can do it or not. And if so, where can I get an example?

  2. After i get random option i can save it in eeprom. and retrieve it later? and what do you think?

  3. Finally, if I have more than 3 selections, for example random 3 item out of 100 item. And what is the maximum amount of items I can randomize?

thank you for your kindness

just have the words in an array and choose randomly an index within the array.

const char * words[] = {"bananas", "oranges", "pineapples", "apples", "grapefruits"};
const size_t wordCount = sizeof words / sizeof * words;

void setup() {
  Serial.begin(115200);
  randomSeed(analogRead(A0)); // increase randomness

  // print all the words
  Serial.println("Vocabulary:");
  for (auto&& w : words) {
    Serial.write('\t');
    Serial.println(w);
  }

  // pick and print a random one
  size_t randomIndex = random(wordCount);
  Serial.print(F("picked random word at index: "));
  Serial.print(randomIndex);
  Serial.print(F(" => "));
  Serial.println(words[randomIndex]);
}

void loop() {}

this index can be stored in EEPROM if you want

the limits are just the available amount of memory

You know about the random() function, right?
https://www.arduino.cc/reference/en/language/functions/random-numbers/random/

thank you for the advice. I understand a little. And in the example there are only numbers so I'm not sure.

Thanks for your advice and example. This really helped me a lot.

Glad it helped!