The description for the function is: populates square matrix of characters with random, lower-case letters a..z. This is what I have so far.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void pop_mtx(int N, char m[N][N])
{
int i;
srand (time(NULL));
for (i=0; i<N; i++)
{
m = rand() % 26 + 'a';
}
return 0;
}
Aucun commentaire:
Enregistrer un commentaire