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

What is d scanf?

1020


What is the importance of c in your views?

1085


Is c still relevant?

1032


What is the deal on sprintf_s return value?

1064


Write a program to generate random numbers in c?

1040


How can I open files mentioned on the command line, and parse option flags?

1013


I heard that you have to include stdio.h before calling printf. Why?

1005


if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.

5134


Explain how can a program be made to print the name of a source file where an error occurs?

1133


What does 3 periods mean in texting?

1006


Why is python slower than c?

1012


What is the use of a semicolon (;) at the end of every program statement?

1410


how to execute a program using if else condition and the output should enter number and the number is odd only...

2200


What are local static variables? How can you use them?

1077


What is the use of a ‘’ character?

1025