This is a question from job interview.Let s say we have "a.c" source file with some function and "a.h" as its header file.Also we have main.c file which calls that function.Now let s suppose we have "a.h" and "a.o"(object file) and a.c is unavailable.How do we call this function now? (I had a hint that we need to use function pointers.Another hint is to do this using pre-compiler directives such as #define and #ifndef). Also i would like to know how in .h file we know if we are linked properly to source file? Thank You
For example, let s say I want to find a particular word or number in a file. The contents are in sorted order (obviously). Since I want to run a binary search on the file, it seems like a real waste ...