C语言:程序退出状态

#include <stdio.h>
#include <stdlib.h>
 
main()
{
   int dividend = 20;
   int divisor = 5;
   int quotient;
 
   if( divisor == 0){
      fprintf(stderr, “除数为 0 退出运行…\n”);
      exit(EXIT_FAILURE);
   }
   quotient = dividend / divisor;
   fprintf(stderr, “quotient 变量的值为: %d\n”, quotient );
 
   exit(EXIT_SUCCESS);
}
 

    原文作者:于惠麟
    原文地址: https://blog.csdn.net/weixin_61659938/article/details/123384196
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞