Home TechnologyProgrammingJava Subscribe to RSS

Why We Use Void Main In C++?

Answer Question

2 Answers - Sort by: Date | Rating

    HI
    main() method is the entry point of  a program in almost all major languages such as java, c, c++, C#, VB.net, python etc. This is where run-time starts executing the program. C++ have various overloaded main functions, such as

    int main()
    void main()
    void main(int argc, char **argv)
    int main(int argc, char **argv)

    you can use either that suits your implementation whether you want to read command line arguments or not.

    Regards
    Farah Khan
    1 0

    Farahkhan 

    answered 5 months ago

      Void main()in this void is return type that means no value is return to the main method.main() is for telling  to the compiler to start the programme Execution from here.
      1 0

      Skgouse 

      answered 5 months ago

        More

           
           

          Ask a Question via Twitter

          Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

          Blurtit Store

          Get T-shirts, hoodies, caps and more at the Blurtit store

          Blurtit International