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 / 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 |
Explain what are the standard predefined macros?
What is c definition?
Do you know what is the purpose of 'extern' keyword in a function declaration?
Write a C program that computes the value ex by using the formula ex =1+x/1!+x2/2!+x3+3!+………….
different between overloading and overriding
code snippet for creating a pyramids triangle ex 1 2 2 3 3 3
what is the diff b/w static and non static variables in C. Give some examples plz.
main() { int x=2, y=4 if ((x==2||y==4) x++ y++ if (y==4+1) { x=x+y; } y++; printf("The values of x and y are %d and %d."x,y); } What is the output?
how to impliment 2 or more stacks in a single dimensional array ?
What is variable in c with example?
How can I find the modification date and time of a file?
1. main() { printf("%d",printf("HelloSoft")); } Output?