ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
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.
 Question Submitted By :: Pushpendra
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
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 0 No
Ataraxic
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
main() { int i=400,j=300; printf("%d..%d"); } ME8
struct ptr { int a; char b; int *p; }abc; what is d sizeof structure without using "sizeof" operator?? Verifone8
What's the difference between struct x1 { ... }; and typedef struct { ... } x2; ?  3
Please list all the unary and binary operators in C.  1
char ch="{'H','I',0};printf("%s",ch);what is output Accenture9
plz answer....A program that takes 3 variables e.g a,b,c in as seperate parameters and rotates the values stored so that value goes a to b, b to c and c to a .  3
Find Error if any in below code, Justify ur answer: struct xx { int a; struct yy { char c; struct xx* p; } struct yy* q; } NDS3
what is the difference between strcpy() and memcpy() function?  1
what is the diff b/w static and non static variables in C. Give some examples plz. Wipro2
Write a program for the following series: 1*3*5-2*4*6+3*5*7-4*6*8+.................up to nterms Convex-Digital4
Study the Following Points: a.One Cannot Take the address of a Bit Field b.bit fields cannot be arrayed c.Bit-Fields are machine Dependant d.Bit-fields cannot be declared as static 1. Which of the Following Statements are true w.r.t Bit- Fields A)a,b&c B)Only a & b C)Only c D)All Accenture2
How to calculate Total working time using Login and logout? Wipro2
Write the program for displaying the ten most frequent words in a file such that your program should be efficient in all complexity measures. Google3
write a program that finds the factorial of a number using recursion?  1
a C prog to swap 2 no.s without using variables just an array? TCS4
write a program to swap bits in a character and return the value prototype of function char fun (char a, charb flag c) where fun returns a char, char a is a the value char b is the bit to be changed and flag c is the bit value for eg: x=fun(45,7,0) since 45 is 0010 0101 and ow x should contain the value 65 (0110 0101) Bosch1
Print all numbers which has a certain digit in a certain position eg: number=45687 1 number=4 2 number=5 etc  2
What's wrong with the call "fopen ("c:\newdir\file.dat", "r")"?  1
what are the uses of structure? HCL5
main() { char *p; p="Hello"; printf("%c\n",*&*p); } ME2
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com