I am unable to find my error or any edge case pls help following is my code :-

#include
using namespace std;

int main() {

int m,n;
cin>>m>>n;

int arr[m][n];

for(int i=0;i<m;i++)
{
	for(int j=0;j<n;j++)
		cin>>arr[i][j];
}
	
for(int i=0;i<n;i++)
{
	for(int j=0;j<m;j++)
		cout<<arr[j][i]<<", ";
}
cout<<"END";
return 0;

}

hello @punitsehrawat423

go to this link-> https://ide.codingblocks.com/
press ctrl + s and save
a link will be generated in ur search bar , share that link with me.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.