I'm new in this community, and I'm trying to understand why this recursive function not get a stack overflow,when I use the post increment (c++) in the call of the function, this passes a value of 0 (i see that when i debug), but when the next function is called, it have a value of 1. I dont understand when the post increment is applied, and why if im passing to the function the value of 0 , in the first argument is doing s+1;
#include <stdio.h>
#include <string.h>
#define LARGO 20
char *esta (char s[], int c){
if(strlen(s))
printf("\n %s", esta(s+c,c++));
return s;
}
int main()
{
char cad[LARGO]= {"hello"};
int c=0;
printf("\n %s", esta(cad,c++));
}
P.S. : Sorry if my english is not the best, It isn't my main language and i try to explain as well i could; and if it is something is not clear tell me and i change it.