return的用处

#include "stdio.h"
main()
{
    int a,b=1,c=0;
     for(a=1;a<5;a++)
     {   
         c=c+a;
    }
     printf("%d",c);
     return ;
     printf("hello word");
}

输出结果是10并没有hello word;return将不会执行下面的语句。

原文地址:https://www.cnblogs.com/doublekai/p/6148194.html