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将不会执行下面的语句。

posted @ 2016-12-09 09:34  Doublekai  阅读(157)  评论(0编辑  收藏  举报