Discussion Locked

Is there any method

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Well I need to know how can I change the default execution of C program thats first the main() is called but i want to call my function b4 main how can I . I tried #pragma
directive but not get succeded is there any routine for this to change theis sequence.

3 replies

by jooehrlein

No. But there are options.
1. Change the main() function to make your function the first call.
2. Make your function another program that runs your function and then calls the existing C program.
3. Write a shell script/bat file/command macro (whatever it's called in the OS you're using) that calls a program for your function and then the existing C program.

This discussion is closed to new replies.