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 insert an InterBase BLOb in Delphi using LoadFromFile? 2

4153


How to detect if the current user is logged in administrator?

1925


'Translate error, value out of bounds' error what does these errors mean?

2746


How to Dynamically drawing a transparent image ?

1635


How to Use escape codes with the format() function ?

1731


How to convert numbers into roman numerals?

2217


How to Check available disk space on large drives?

1727


How to debug an Apache Shared Module?

1778


How to Use InvalidateRect()to repaint the entire form?

2141


Why reusing or inheriting from a Remote Data Module is not a good idea?

1611


What are IDAPI and SQL links ?

1747


How to Get the filename and path of a local table?

1695


How to get UpdateMode to work for TQuery on a SQL Server 7.0 table?

1918


How to Migrate a project from Delphi 1 or 2 to Delphi 3 ?

1656


How to install BDE network ?

1569