I want to randomly choose between 1 and 50 Pokemons, but rand chooses only the 42nd one of the array (Dragonite). How can I make it be random?
#include <stdlib.h>
#include <stdio.h>
int main(){
    char sorteio1[50][11] = {"Bulbasaur","Venusaur","Charmander","Charmeleon","Charizard","Pidgey","Pidgeotto","Pidgeot","Pikachu","Raichu","Clefairy","Vulpix","Ninetales","Meowth","Psyduck","Golduck","Mankey","Primeape","Growlithe","Arcanine","Abra","Kadabra","Alakazam","Magnemite","Magneton","Onix","Cubone","Marowak","Staryu","Starmie","MrMime","Jynx","Magikarp","Gyarados","Lapras","Ditto","Eevee","Vaporeon","Porygon","Snorlax","Dragonair","Dragonite","Mewtwo","Mew","Chikorita","Sentret","Furret","Hoothoot","Lanturn","Pichu"};
    int i;
    i = rand() %50;
    printf ("%s\n",sorteio1[i]);    
    system ("Pause");
    return 0;
}
 
    