This Is a Certified Answer

Certified answers contain reliable, trustworthy information vouched for by a hand-picked team of experts. Brainly has millions of high quality answers, all of them carefully moderated by our most trusted community members, but certified answers are the finest of the finest.
When we define the main program as just
      main ()  or  int  main()
then it is possible that the function main()  returns a status value or an important computation result to the shell ( or ksh or csh programs) in the operating system.  In a batch file  (*.bat) , this return value is used to find the success or failure of the program.  Or, some computed value is passed from the program to the user involving the program at the shell prompt.  Often batch files are stopped if one program fails in between and takes an input from the user running the batch file.


When one defines as
        void  main ()

  then the programmer knows that the this function does not return any value to the shell invoking the program.  The shell does not know if the program succeeded or not.

1 5 1
click on thank you link and select best answer