Rotate NXN image

code:
include iostream

using namespace std;

void rotate(int arr[][1000],int n)
{
for(int row=0;row<n;row++)
{
int start_col=0;
int end_col=n-1;

	while(start_col<end_col)
	{
		swap(arr[row][start_col],arr[row][end_col]);
		start_col++;
		end_col--;
	}
}

for(int i=0;i<n;i++)
{
	for(int j=0;j<n;j++)
	{
		if(i<j)
		swap(arr[i][j],arr[j][i]);
	}
}

}

int main()
{
int n,i,j;
cin>>n;
int arr[1000][1000];
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
cin>>arr[i][j];
}
}
rotate(arr,n);
return 0;
}

Hey @vashishthkuntal.gajjar2019
You forgot to print the answer in last

for(i=0;i<n;i++)
	{
		for(j=0;j<n;j++)
		{
		cout<<arr[i][j]<<" ";
		}
		cout<<endl;
	}