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 |
how to create c progarm without void main()?
Why c is called procedure oriented language?
What are the advantages of Macro over function?
What does volatile do?
#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }
write a program to compare 2 numbers without using logical operators?
You are given a string which contains some special characters. You also have set of special characters. You are given other string (call it as pattern string). Your job is to write a program to replace each special characters in given string by pattern string. You are not allowed to create new resulting string. You need to allocate some new memory to given existing string but constraint is you can only allocate memory one time. Allocate memory exactly what you need not more not less.
what is const volatile?
Explain two-dimensional array.
i need all types of question paper releted to "c" and other language.
for (i <= 5 && i >= -1;++i; i > 0) { printf("%d ", i); }
What is the difference between far and near ?