The truth happens to me something very strange is that I copy one matrix in another as I have always done but it is badly copied I leave photo .
As you can see in the photo, the first 3 columns are copied well, but 4 copies the first one with a space down and then copies what is in the 4 column in the last one without reason (there must be a reason but there is no which is), if someone knows why it happens I would be grateful I'll leave the code.
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <string.h>
#include <time.h>
int main(){
char *p=getenv("USER");
char frase[1024];
printf(" [>>] Entroduce un frase para cifrar.\n" );
printf(" %s~$ ",p );
scanf("%s", frase);
int clavei[3][3];
int subclave[3][43];
int rotword[3][0];
int x,y;
int nram;
int i,j;
int aux;
for(i=0 ; i<=3 ; i++){
for(j=0 ; j<=3 ; j++){
nram = 0 + rand() % ((255 + 0) - 0);
clavei[i][j] = nram;
printf("%x ,", clavei[i][j]);
}
printf("\n");
}
printf("------------------------------------------------------------------------------------------------------------------------------------------");
printf("\n");
for(i=0 ; i<=3 ; i++){
for(j=0 ; j<=43 ; j++){
subclave[i][j] = 0;
}
}
for(i=0 ; i<=3 ; i++){
for(j=0 ; j<=3 ; j++){
subclave[i][j] = clavei[i][j];
}
}
for(i=0 ; i<=3 ; i++){
for(j=0 ; j<=43 ; j++){
printf("%x ,", subclave[i][j]);
}
printf("\n");
}
printf("\n");
printf(" Adios :)\n");
return 0;
}