Linkage Question: someone enlighten me pls!

This is a discussion on Linkage Question: someone enlighten me pls! within the C Programming forums, part of the General Programming Boards category; tried to readup on the linkage, i noe there is internal linkage, external linkage, no linkage. but my understanding is ...

  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    2

    Linkage Question: someone enlighten me pls!

    tried to readup on the linkage, i noe there is internal linkage, external linkage, no linkage. but my understanding is still not enough to solve this question.

    someone pls enlighten me, and hopefully with explanation.

    thank in advance!


    which of the four given statements is true about the following program?
    Code:
    int i = 0;
    void f(long i);
    void main (void){
    	f(i);
    }
    void f (long i){
    	long k = i;
    	static int j = 1;
    	if(j>1)
    		k = i+2;
    	j = j*2;
    }
    (a) variable i at line 1 has interenal linkage
    (b) variable i at line 6 has function prototype scope
    (c) variable j at line 8 has automatic storage
    (d) varirable k at line 7 has no linkage.

  2. #2
    Registered User
    Join Date
    Nov 2008
    Location
    INDIA
    Posts
    64
    option (d) is correct .

    The C Book — Linkage

  3. #3
    Registered User
    Join Date
    Apr 2009
    Posts
    66
    Don't do your home work here !

  4. #4
    Registered User
    Join Date
    Mar 2010
    Posts
    2
    not trying to do my homework here. already read up for quite a while but still cant get it.

    i thinking answer is either (B) or (D), however, i not sure on it.

  5. #5
    Registered User
    Join Date
    Apr 2009
    Posts
    66
    Appreciate your effort

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question About My Homework Pls Help Me İmmediately
    By jennyyyy in forum C Programming
    Replies: 27
    Last Post: 03-13-2008, 12:40 PM
  2. c++ bool question pls help
    By rderiu in forum C++ Programming
    Replies: 9
    Last Post: 01-06-2003, 10:45 PM
  3. quick question pls help.
    By Ment in forum C++ Programming
    Replies: 4
    Last Post: 12-24-2002, 11:44 AM
  4. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 03:57 PM
  5. Pls Help Me In This Question!!!
    By Joanna in forum Windows Programming
    Replies: 1
    Last Post: 10-20-2001, 03:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21