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
How to Get a list of the available drives on a system?
Do I have to understand object-oriented programming to use Delphi?
How to insert an InterBase BLOb in Delphi using LoadFromFile? 2
How to Change the location of the object repository ?
How to Create a palette with more than one entry ?
How to Calculatea point using angles and distance?
what are the different Dataset event handlers?
What is a good BDE Alternative?
How to Retrieving the program that is associated with a given extension?
How to Use Stored Procedures ?
How to DetermineDrive Type ?
How to Switch between different data sources?
How to Create new constructors?
How to Detect if the system time has been changed ?
How to Remove drives listed in a TDriveComboBox ?