what is linkage error when it occurs in c program
Answers were Sorted based on User's Feedback
Answer / karthik
linkage error occurs when the library files included in
program are not present in default directory you added while
installing compiler.. set environment settings and change
directory.... you will not get linkage errors..
| Is This Answer Correct ? | 14 Yes | 1 No |
Answer / naresh
main()
{
extern int iExtern;
iExtern = 20;
printf(ā%dā,iExtern);
}
Why do we get linkage error for the above code
| Is This Answer Correct ? | 14 Yes | 3 No |
Answer / rajesh
Linkage error occurs when the linker fails to resolve all
the symbols during the linking process. This can happen if
the linker is not able to find any definition for an extern
declaration in one .C file by the time of linking.
| Is This Answer Correct ? | 6 Yes | 2 No |
What are the phases in s/w developed life cycle? wat is the diff b/w stack & queue...where do we use stack
what is differnence b/w macro & functions
What are reserved words?
In scanf h is used for
Can I initialize unions?
What is meant by type specifiers?
in linking some of os executables are linking name some of them
# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(x+2,y-10)); } the output of the program is a.8 b.6 c.7 d.none
Explain Function Pointer?
There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take turns to remove these eggs from the baskets. On each turn, a player must remove at least one egg, and may remove any number of eggs provided they all belong to the same basket. The player picking the last egg(s) wins the game. If you are allowed to decide who is going to start first, what mathematical function would you use to decide so that you end up on the winning side?
How do I initialize a pointer to a function?
what is the output of the following program? main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }