Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

why we should use main in C

Answer Posted / naendra allam

Asume abc.c is the program
--------\abc.c\---------
#include <stdio.h>
#include <stdlib.h>

int naren()
{
printf("Hi--- Ther is no main() here.\n");
exit(EXIT_SUCCESS); //Not supposed to use 'return 0;'
}
-----------------------
//compilation with GCC
$gcc -c abc.c

---> which generates abc.o

$ld --dynamic-linker /lib/ld-linux-so.2 -oabc abc.o -enaren
-lc

---> which generates executable 'abc'

$./abc
Hi--- Ther is no main() here.

--->you ran the program.

ALL THE BEST

Narendra Allam
IVTL INFOVIEW

Is This Answer Correct ?    12 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to Creat a flashing icon ?

1863


How to generate steps to reproduce your issue for Borland Developer Support?

1673


'Memo too large' error with MSSQL . What does this error indicates?

1699


How to Pass a function to a procedure or vice versa?

1858


Explain the methods findfirst, findnext and findclose?

841


Why won't the virtual key codes work in program?

1740


How to Change the font in a hint window ?

1893


How to Check available disk space on large drives?

1775


Explain the MasterSource/MasterFields behavior?

2036


How to Change the default width/height of the editor?

1860


What is "Error 113" during installation?

2276


How to Select an item in a TListView when the checkbox is checked ?

1896


Where is TReport in Delphi 6?

2026


How to Print in Delphi without using the TPrinter Unit ?

1884


How to Use FindFirst to search for files?

1695