Help me in solving AOCC02 problem

My issue

Can someone explain the line A[i-1] = i, isn’t i suppose to be position of the array.

My code

// Update the '_' in the code below to solve the problem

#include <bits/stdc++.h>
using namespace std;

int main() 
{
	int t;
    cin >> t;
	
	while(t--)
	{
	    int N;
	    cin>>N;
	    int A[N];
	    
	    for(int i = 1; i <= N; i++)
	    {
	        A[i-1] = i;
	    }
	    // print the elements of array A
	    for(int i = 0; i < N; i++)
	    {
	        cout << A[i] << " ";
	    }
	    cout << endl;
	    // print the elements of array A in descending order
	    for(int i = N-1; i >= 0; i--)
	    {
	        cout << A[i] << " ";
	    }
	    cout << endl;
	}
}
	   

Learning course: Solve Programming problems using C++
Problem Link: CodeChef: Practical coding for everyone

@kaminidas22
Its because array begin from 0 index and at 0th index u have to put 1 so when you loop from 1 till n then u fill the array u will do A[i-1]=i;