Thread: does a variable can be a static and extern both ?

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

    does a variable can be a static and extern both ?

    Hello

    does a variable can be a static and extern both at a time ?

    Code:
    static extern int i;
    What does it mean ?

    M too confused with that

    Please help me..!!

    Thanks
    Gunjan

  2. #2
    Registered User
    Join Date
    Mar 2011
    Posts
    278
    Where did you see that? Does it even compile?

  3. #3
    Programming King Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Middle of NoWhere
    Posts
    320
    1. static is used to define/declare the variables or functions with-in the file, being used.
    2. extern is used to define/declare the variables or functions in some other file so that they could be used in any other file.....

    I hope, now you got the answer.........

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. static global variable and static extern global variable
    By gunjansethi in forum C Programming
    Replies: 8
    Last Post: 01-12-2011, 01:00 AM
  2. [C#] Intercept SysListView32 item added
    By Devils Child in forum Windows Programming
    Replies: 9
    Last Post: 03-26-2010, 07:29 AM
  3. Static variable usage
    By shwetha_siddu in forum C Programming
    Replies: 1
    Last Post: 04-02-2009, 12:33 AM
  4. LNK2001 ERROR!!! need help
    By lifeafterdeath in forum C++ Programming
    Replies: 7
    Last Post: 05-27-2008, 05:05 PM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM