(1)函数体中任意一处出现的return语句使得程序推出函数体,下面的代码示例了这个说法:
#include "stdio.h"
int main()
{
int intcounter_1,intcounter_2;
intcounter_2 = 3;
for (intcounter_1=0; intcounter_1<=10;intcounter_1++)
{
printf("before if in for/n");
if (intcounter_1==intcounter_2)
{
printf("counter1 now eaquls to counter2/n");
return 0;
}
printf("after if in for/n");
}
printf("after for in main/n");
printf("intcounter_1 =%d/n",intcounter_1);
return 0;
}
++++++++++++++++++++++++++++++++++++++++++++++++