#include<stdio.h>
#include<stdlib.h>
#define MSIZE 10
int main()
{
int Size, gen, i, j;
printf("Enter number of generations\t");
scanf("%d", &gen);
printf("\nEnter size of the matrix (max size is %d and min is 2)\t", MSIZE);
scanf("%d", &Size);
if (Size > MSIZE) {
printf("\nSize should not be more than %d", MSIZE);
return 1;
}
if (Size < 2) {
printf("\nSize should not be less than 2");
return 1;
}
char **m = (char**) calloc(Size, sizeof(char*));
for (i=0; i<Size; i++)
{
m[i] = (char*) calloc(Size, sizeof(char));
}
printf("Enter matrix of first generation\n");
for (i=0; i<Size; i++) {
for (j=0; j<Size; j++) {
scanf("%c", &m[i][j]);
/*to make sure*/
printf("%c ", m[i][j]);
}
printf("\n\n");
}
}
#include<stdio.h>
#include<stdlib.h>
#define MS