C Programming - Declarations and Initializations - Discussion

Discussion Forum : Declarations and Initializations - General Questions (Q.No. 2)
2.
What are the types of linkages?
Internal and External
External, Internal and None
External and None
Internal
Answer: Option
Explanation:
External Linkage-> means global, non-static variables and functions.
Internal Linkage-> means static variables and functions with file scope.
None Linkage-> means Local variables.
Discussion:
95 comments Page 7 of 10.

Shreeketh said:   1 decade ago
What is the difference between non static variable and local variable?

Shiny said:   1 decade ago
Why external linkage means global, non static, functions?
Why internal linkage means static variables, functions with filescope?
Why none linkage means local variables?

Please give clear information about those three.

Arvind kumar said:   1 decade ago
Static variable are the variable which allocate the memory as well as program start and they create only one copy for more then object.

Jatin said:   1 decade ago
Its too late and ignore if not but it shouldn't be like this:

If x = 2.

z = x++ + ++x // here because x = 2, value 2 is assign to x (value 2 stored to perform overall function) n stored after that it'll increment by 1.

=> z = (2) ++.

That will 3. Till z = x++ value of x is 3.
After that z = 3 + ++x //till here x = 3.

So further by pre-increment 3 will incremented by 1 value will be 4. So z = 2 + 4 = 6.

Harsh said:   1 decade ago
Can anyone explain the answer of this: z = (x++ + ++x)x = 2. And z = (++x + x++)x = 2.

Gowthami said:   1 decade ago
What is meant by external linkage?

Priya said:   1 decade ago
You must initialize the i with a value because it will take a garbage value by default.

Karthick said:   1 decade ago
Why we use return in program?

Tiger said:   1 decade ago
@Karthick we use the return in the program because the return any value for example.

#include<stdio.h>
int main()
{
int i=5;
return i;
}

Output of the above program is 5 because it will be return the value of the i.

Kavitha said:   1 decade ago
#include<stdio.h>
int main()
{
int x=3;
int z;
z=++x + x++;
printf("%d",z);
}

It gives the output 9,how?


Post your comments here:

Your comments will be displayed after verification.