F
fr3shman
------------------------------------------------------
main()
{
void kk();
kk(0);
getch();
}
void kk(j)
int j;
{
if (j<10)
{
j++;
printf("the number is:%d\n",j);
kk(j);
printf("the number is k%d\n",j);
}
}
-------------------------------------------------------
I thought the program would printf:
the number is:1
the number is:2
the number is:3
the number is:4
the number is:5
the number is:6
the number is:7
the number is:8
the number is:9
the number is:10
-------------------------------------------------------
but,the result is:
Invalid keyboard code specified
the number is:1
the number is:2
the number is:3
the number is:4
the number is:5
the number is:6
the number is:7
the number is:8
the number is:9
the number is:10
the number is k10
the number is k9
the number is k8
the number is k7
the number is k6
the number is k5
the number is k4
the number is k3
the number is k2
the number is k1
main()
{
void kk();
kk(0);
getch();
}
void kk(j)
int j;
{
if (j<10)
{
j++;
printf("the number is:%d\n",j);
kk(j);
printf("the number is k%d\n",j);
}
}
-------------------------------------------------------
I thought the program would printf:
the number is:1
the number is:2
the number is:3
the number is:4
the number is:5
the number is:6
the number is:7
the number is:8
the number is:9
the number is:10
-------------------------------------------------------
but,the result is:
Invalid keyboard code specified
the number is:1
the number is:2
the number is:3
the number is:4
the number is:5
the number is:6
the number is:7
the number is:8
the number is:9
the number is:10
the number is k10
the number is k9
the number is k8
the number is k7
the number is k6
the number is k5
the number is k4
the number is k3
the number is k2
the number is k1