For this Question: Given an N*N  matrix. Print the elements of the matrix in anticlockwise order (see the sample for better understanding).First line contains N. 
N lines follow each containing N space seperated integers.

Constraints:-
2 <= N <= 500
1 <= Mat[i][j] <= 1000Output N*N integers in a single  line separated by spaces, which are the elements of the matrix in anti-clockwise order.Sample Input
4
1 2 3 4 
5 6 7 8 
9 10 11 12 
13 14 15 16 

Sample output 
1 5 9 13 14 15 16 12 8 4 3 2 6 10 11 7 

Explanation:
We start from 1 , go down till 13 and then go right till 16 then go up till 4 , then we go left till 2 then down and so on in anti-clockwise fashion .

Sample Input 
3
1 2 3 
4 5 6 
7 8 9 

Sample output
1 4 7 8 9 6 3 2 5
, I have written this Solution Code: 
#include <bits/stdc++.h>
using namespace std;

#define N 1000

void counterClockspiralPrint(  int m,
                             int n,
                             int arr[][N])
{
    int i, k = 0, l = 0;

    //  k - starting row index
    //    m - ending row index
    //    l - starting column index
    //    n - ending column index
    //    i - iterator

    // initialize the count
    int cnt = 0;

    // total number of
    // elements in matrix
    int total = m * n;

    while (k < m && l < n)
    {
        if (cnt == total)
            break;

        // Print the first column
        // from the remaining columns
        for (i = k; i < m; ++i)
        {
            cout << arr[i][l] << " ";
            cnt++;
        }
        l++;

        if (cnt == total)
            break;

        // Print the last row from
        // the remaining rows
        for (i = l; i < n; ++i)
        {
            cout << arr[m - 1][i] << " ";
            cnt++;
        }
        m--;

        if (cnt == total)
            break;

        // Print the last column
        // from the remaining columns
        if (k < m)
        {
            for (i = m - 1; i >= k; --i)
            {
                cout << arr[i][n - 1] << " ";
                cnt++;
            }
            n--;
        }

        if (cnt == total)
            break;

        // Print the first row
        // from the remaining rows
        if (l < n)
        {
            for (i = n - 1; i >= l; --i)
            {
                cout << arr[k][i] << " ";
                cnt++;
            }
            k++;
        }
    }
}


int main()
{
    int n;
    cin>>n;
    int arr[n][N];
    for(int i=0;i<n;i++){
            for(int j=0;j<n;j++){
        cin>>arr[i][j];
    }}
 counterClockspiralPrint(n,n, arr);
    return 0;
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?