static global & global variables

This is a discussion on static global & global variables within the C Programming forums, part of the General Programming Boards category; I studied about satic global and global variables but still confused so plz help me to understand this topic and ...

  1. #1
    Registered User
    Join Date
    Sep 2009
    Location
    pakistan
    Posts
    3

    Question static global & global variables

    I studied about satic global and global variables but still confused so plz help me to understand this topic and i'll realy appreciate if you can giva any code as example ...........!

  2. #2
    Registered User
    Join Date
    Aug 2009
    Posts
    5
    A program can be spread across two or more files.So, a global variable can be accessed by all the files whereas, a static global variable can be accessed only by the file in which it is declared.Static means permanent and hence the value in static global variable is shared by
    all the functions in that file.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. uploading file to http server via multipart form data
    By Dynamo in forum C++ Programming
    Replies: 1
    Last Post: 09-03-2008, 05:36 AM
  2. Question about Static variables and functions.
    By RealityFusion in forum C++ Programming
    Replies: 2
    Last Post: 10-14-2005, 03:31 PM
  3. Global variables used in a linked class, getting errors.
    By RealityFusion in forum C++ Programming
    Replies: 3
    Last Post: 09-24-2005, 01:25 AM
  4. Replies: 2
    Last Post: 10-02-2004, 11:12 AM
  5. Static global variable acting as global variable?
    By Visu in forum C Programming
    Replies: 2
    Last Post: 07-20-2004, 09:46 AM

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