answersLogoWhite

0

The main() function in C or C++ programming is the programmer's entry point. Upon initial load into memory of a program, the run-time library's initialization routine is executed. The last thing that initialization routine does is call the programmer's main() function. Upon exit from main(), the run-time wraps things up, and the program terminates.

User Avatar

Wiki User

∙ 15y ago
User Avatar

What else can I help you with?

Related Questions

Is it compulsory to write static with void main?

Every C# application is started on the startup class' static Main method. Yes, it must be static, but void is not the only returned type. The 4 signatures:static void Main();static void Main(string[] arguments);static int Main();static int Main(string[] arguments);Ideally, there should be one and only one Main method in your application.


Which method is called first of all other methods when any application executed in c sharp?

static method Main() of the start object/class.There are 4 different signatures of Main():static void Main();static int Man();static void Main(string[] args);static int Main(string[] args);The starting object/class can have only one of them. Other classes or objects may have Main() method as well. (But why would be the question, Main() is NOT a good OO method name anyway. Method name should be a verb or start with a verb)


How can you display Hindi word in output of java program?

Class hindi { public static void main() { char c; for(c=2309;c<2362;c++) { System.out.println(" "+c); } } }


How do you write a program in c plus plus in which static variables are declared?

#include <stdio.h> static int myvar1, myvar2; int main (void) { puts ("It was easy"); return 0; }


Write a Java program to generate a copy of itself?

public class S{public static void main(String[]a){String o="public class S{public static void main(String[]a){String o=%c%s%c;System.out.printf(o,34,o,34);}}";System.out.printf(o,34,o,34);}}


Why to write void main in c programing?

it is always not necessary to write "void main " in c programming.it depends on the source code we use if we have to return a value then void is not necessary because void returns the null.While coding in borland C++ we need to write void main but we dont need it in dav c++.In C (and C++) the standard allows int main (void) and int main (int argc, char **argv)


C program to find square of number using do while loop?

class Abc { public static void main(String[] args) { System.out.println("Hello World!"); } }


How do you create a function that can pass through parameters in C programming language?

example: static void fun (int x) { printf ("x=%d\n", x); } int main (void) { fun (12); return 0; }


Why do you use static key word in java main method?

Static means that something is done at compile time instead of when the object is instantiated, so you would therefore call a static method (doSomething()) through the class name rather than the object name. class A{ public static void B(){ } public void C(){ } } Let's say A instance = new A(); To access B you would say A.B(), while to access C you would say instance.C();


How do you print a star triangle in c sharp?

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication3 { class Program { static void Main(string[] args) { for (int i = 1; i <= 10; i++) { for (int j = 1; j <= i; j++) { Console.Write("* "); } Console.Write("\n"); } Console.Read(); } } }


What is the role of void in functions of c?

this is a void main()int, char, are execution the program and it is not return the void.


Where void main is called in c?

main() is the function from where the execution starts.