Anonymous
public text v1 · immutable
for ( heightCheck = 0; heightCheck < height; heightCheck++){
int *row = malloc(sizeof(int)*width);
if ( row == NULL ){
perror ("Out of Memory");
return;
}
int *column = malloc(sizeof(int) * height );
if ( column == NULL){
perror (" Out of Memory" );
return;
}
/* Reads in the value of each pixel into a malloc'ed array */
for ( i = 0; i < width ; i++ ){
scanf("%d", &row[i]);
}
for ( i = 0; i < height; i++ ){
column[i] =