#include <stdio.h> void CntTo3(int); void CntTo2(int); void CntTo1(int); int main() { int n; CntTo3(3); return 0; } void CntTo3(int p) { CntTo2(p-1); printf("%d\n",p); } void CntTo2(int p) { CntTo1(p-1); printf("%d\n",p); } void CntTo1(int p) { printf("%d\n",p); } After compilation, the answer is shown as -
1 2 3 It turns out that in order to output 1 in the function CntTo3 , you need to execute the function CntTo2 , which will be 2, well, and CntTo1 already outputs without calculations 3. Did I understand correctly? If so, why is CntTo3(3) defined in main() CntTo3(3) and why is the variable n ?