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.

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Why static variable is used in c?

1033


define string ?

1097


What is wrong with this statement? Myname = 'robin';

1323


What are 'near' and 'far' pointers?

1031


Write a program that accept anumber in words

1752


Describe the order of precedence with regards to operators in C.

1045


What is auto keyword in c?

1202


Subtract Two Number Without Using Subtraction Operator

838


Write a program to swap two numbers without using a temporary variable?

1116


Why should I use standard library functions instead of writing my own?

1261


Which is best book for data structures in c?

1091


Does * p ++ increment p or what it points to?

1114


What does c mean in standard form?

1168


What is a pointer in c?

1539


What is a substring in c?

1032