I need to find the output of this code. I know that this is recursion but i do not exactly know how this code actually works. I thought that this would be an infinite code but it is not. Can someone please explain me?
 #include <stdio.h>
 char *str = "kre";
 void main(void) {
     int i;
     static int j = 3;
     for (i = 0; i < j; i++) {
         printf("%d ", j--);
         main();
     }
     printf("%sn%c ", str, 'i');
 }
 
    