He called the countdown. Search Wikipedia for this. You can do it both recursively and iteratively.
Amir, he wants between 0 and i + 1, not between 0 and i. And I think that passing arrays on the stack is slower than using them globally.
I think you need something like this:
int a[YOUR_LENGTH]; void backtracking (int n, int counter) { if (counter == n) {
source share