GeeksforGeeks » Interview Questions
ADP Interview Question for Software Engineer/Developer (0 - 2 Years)
(2 posts)-
what is shared library?
With small c program implement Dll? -
shared library is a concept which allows to use same code or data repetitively without need for each application to save a separate copy of same code or data by its own.In windows,DLL is an implementation of shared library.
here goes :
#include<stdio.h>
int
hello()
{
printf("HELLO WORLD");
}
First compile mydll.c to object code
Then, tell gcc that it is building a shared library:
now link to the dll with a simple program:
int main()
{
hello();
}
hope it would be helpful
Reply
You must log in to post.