Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How we add our function in liabrary as liabrary function.
Exp. we want use our int factorical(int); function as int
pow(int,int); function working in math header file.



How we add our function in liabrary as liabrary function. Exp. we want use our int factorical(int);..

Answer / ataraxic

First, implement factorial in standalone module
(factorial.c for example).
Then complie it, create an archive and link it with our
program (my.c for example):

Compilation
1. gcc -c factorial.c -o factorial.o

Archiving
2. ar -rcsv libmy.a factorial.o

Compile our prog with new lib
3. gcc my.c -L. -lmy -lm -o my

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Interview Questions

what is diffrence between string and character array?

1 Answers  


how to swap two nubers by using a function with pointers?

1 Answers  


Explain what is meant by high-order and low-order bytes?

0 Answers  


How can you find the day of the week given the date?

0 Answers  


What do you mean by invalid pointer arithmetic?

0 Answers  


What is dynamic dispatch in c++?

0 Answers  


What is the meaning of ?

0 Answers  


You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.

0 Answers  


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

0 Answers  


why TCS selected more student in the software field from all institution.

5 Answers   TCS,


what is pointer ? what is the use of pointer?

6 Answers   Infosys,


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

0 Answers  


Categories