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
can any one provide me the notes of data structure for ignou cs-62 paper
What are the back slash character constants or escape sequence charactersavailable in c?
What is spaghetti programming?
What is difference between structure and union?
What is scope of variable in c?
Why are all header files not declared in every c program?
What is putchar() function?
How old is c programming language?
how to create duplicate link list using C???
Are the outer parentheses in return statements really optional?
How can I send mail from within a c program?
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
Explain the advantages and disadvantages of macros.
When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
Tell me the use of bit field in c language?