why we should use main in C

Answer Posted / sureshg

No, we can execute a pgm without main also, see here sorry do this pgm in your system with gcc compiler,,,,,

#include<stdio.h>
int exit(int);
{
printf("hello welcome to my answer");
exit(0);
}

while u compile this pgm type
gcc -nostartfiles filename.c

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to Get the current line number of a TMemo?

1839


How to install programatically a printer?

1366


How to set the desktop icon color in code, or make the text behind them transparent?

1200


How to Calculate an angle from two points?

1313


How to capture an image from a video source?

1371






How to Connect to a remote CORBA server?

1286


How to Disable ALT-F4 to prevent form closing

3898


With what commands you can Delete a directory and all the directories with files?

1148


How to Determine the last access time of a given file ?

1383


How to use far pointers?

1619


How to eject a CD-ROM in code?

1358


How to get the version information for a file?

1332


How to Print a web page using the HTML control?

1309


Why is there no "Save" button in the save dialog box?

1353


How to Convert Data in Paradox Tables to InterBase Using Delphi?

1239