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

How would you obtain the current time and difference between two times?

1339


Can a pointer be volatile in c?

1044


What do you mean by c what are the main characteristics of c language?

1077


Is c programming hard?

1081


Explain #pragma statements.

1100


a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor

1154


How do you do dynamic memory allocation in C applications?

1140


What does the message "automatic aggregate intialization is an ansi feature" mean?

1242


What is ctrl c called?

1100


Why void main is used in c?

1104


Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings

2808


What is structure data type in c?

1069


What is function in c with example?

1229


What is the difference between memcpy and memmove?

1086


Is c easy to learn?

1034