yes u can do in c using the pragma Directive
there are two directive that allowes u to runyour function before the call
to main or termination of the main
1) #pragma startup
2) #pragma exit
implementation:
void beforemain();
void aftermain();
#pragma startup beforemain
#pragma startup aftermain
int main()
{
printf("\ni m inside main\n");
return 0;
}
void beforemain()
{
printf("\ni m before the main and is executing.........!!!\n");
}
void aftermain()
{
printf("\ni m after termination of main and is
executing.........!!!\n");
}
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.