1

I have a function say foo defined as

void foo (int foo_arg)
{
  printf("%d",foo_arg);
}

What is the linkage type of foo_arg?

Eimantas
  • 48,927
  • 17
  • 132
  • 168
Stewart
  • 21
  • 2

1 Answers1

6

In C there are three kinds of linkage: external, internal, and none.

Formal parameters have no linkage

Section 6.2.2/6 (ISO C99)

The following identifiers have no linkage:

  • an identifier declared to be anything other than an object or a function;
  • an identifier declared to be a function parameter;
  • a block scope identifier for an object declared without the storage-class specifier extern.

Also read this thread.

Community
  • 1
  • 1
Prasoon Saurav
  • 91,295
  • 49
  • 239
  • 345