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 Use the WinApi GetObject to get a bitmap?
what are the files that need to be included with applications using MSACCESS?
Define PRIMARYLANGID(), SUBLANGID(), and MAKELANGID() macros?
How to Create Non-Visual Components Without Icons ?
what is the use of TSocketDispatcher?
How to create indexes with the TTable create function?
How to Convert ASCII files to Paradox tables?
How to Get the current line number of a TMemo?
How to Map a DLL into another process ?
How to Place a grid in edit mode programatically?
How SQL Links determines if an MSSQL table can refreshed?
How to Finddistance between two points?
How to Migrate a project from Delphi 1 or 2 to Delphi 3 ?
How to Get current record from a TDBGrid ?
How to Move a form by clicking in its client area ?