Second run changes into 0
@abhisheksingh80511 hey in this part of code
for(int i=0;i<size/2;i++){
for(int j=0 ; j<size ; j++){
swap(transpose[i][j],transpose[i+size-1][j]);
}
}
size=4 ; so when i=1 then transpose[4][j] doesn’t exist. so correct your code.