R

Rudra Pratap Singh • 3.39K Points
Extraordinary

Q. What is the name of the main function of a C program?

  • (A) principal
  • (B) main
  • (C) any name
  • (D) begin

Explanation by: Rudra Pratap Singh
The name of the main function of a C program is ‘main()’. The main function is the most important function in C programs: it is mandatory in all programs. The execution of a program automatically calls the main function. Example:

#include <stdio.h>
int main() 
{
   printf("Hello, World!");
   return 0;
}

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics