Thread: C

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    3

    C

    What is the differnce between Global Variable and Global static variable

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    202
    Even though I'm pretty damned sure this has to be covered in a FAQ somewhere, I can't sleep, so here's an answer:

    A global variable is a variable that is accessable by any function in the file.

    A static variable (of any kind) is one that is unchangeable.

    starX
    www.axisoftime.com

  3. #3
    Sayeh
    Guest
    Actually, here's the difference:

    Global Variable-- can be accessed by any other function, across any number of source files, requires 'extern' referencing.

    Static Global Variable-- Can be access by any functions _within_ the file it's in. Cannot be accessed from other sourcefiles.

    enjoy.

  4. #4
    Dimeslime
    Guest
    Ahhhhh, that's what those are!! GEEEEZZ, i feel sooo much relief!! ahhhhh yessssss the coooool airrr and breeezee.. i need a coffee.

  5. #5
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    A global variable is an event somewhere in the world that everyone hears about in the newspaper the next morning, whereas a static global variable is responsible for all that fuzz on the tv screen channels before you hook up the cable line.

  6. #6
    Registered User
    Join Date
    Feb 2002
    Posts
    3

    thanx

    HI All,
    Thanx for ur reply .............

Popular pages Recent additions subscribe to a feed