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 |
What is this pointer in c plus plus?
write a c program to remove all the duplicate characters in a string and replace with single character? ex:-input- AAABBBCCC output- ABC
struct tag{ auto int x; static int y; };main() { struct tag s; s.x=4; s.y=5; printf(“%d”,s.x); }
What is period operator in c?
What is the difference between i++ and i+1 ?(in terms of memory)
What is Generic pointer? What is the purpose of Generic pointer? Where it is used?
Why do we use int main instead of void main in c?
Can a pointer point to null?
what type of questions arrive in interview over c programming?
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
Three major criteria of scheduling.
write a “Hello World” program in “c” without using a semicolon?