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 make your main form fill up the Desk Top space?

1500


How to Get printer capabilities?

2815


How to Add TrueType fonts to windows in code?

1609


I am trying to call from Delphi and it GPFs. Whats up?

832


How to Insert a file at the cursor ?

1746


How do we get access to a database from Delphi?

871


How to Create a custom word break procedure?

1845


What is the process of exception handling in delphi?

819


How to Load a locale file into the THTML component ?

1715


How to Access a grid's column or row by name ?

1603


How to Check drive ready status?

2320


How to Change the display mode settings in code?

1754


How to convert a .dfm file to text and vise versa?

1693


How to use far pointers?

1931


How to Return application's exit code?

1585