Deletions:
Additions:
Deletions:
roroliracolo
Additions:
roroliracolo
Additions:
Can we call any function before main function is called?
There is no portable way to do that. Few compiles provide extensions to designate a different function as start-up function, but thats not standard and portable( For Example: Turbo C provides #pragma startup directive), but its not standard and hence not a portable method. And in freestanding environments like embedded systems, any function can be made as start-up function, there is no requirement for main to be start-up function in such environments.
Deletions:
In C its not possible to call a function before main() as it is called by operating system itself but in C++ using namespaces we can call any function before main...........
In C its not possible to call a function before main() as it is called by operating system itself but in C++ using namespaces we can call any function before main...........