Closed Thread
Results 1 to 2 of 2

Thread: C- Syntax to allocate Global variables to consecutive memory locations

  1. #1
    techie82 Guest

    C- Syntax to allocate Global variables to consecutive memory locations

    Hello all

    I'm a fresher to Microcontroller programming. I have defined certain global variables that I need to store at consecutive memory locations, say starting from 0x8000h . Will appreciate if anyone can give me the syntax / instructions to go about the same.

    thanks

    techie

  2. CODECALL Circuit advertisement

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,494
    Blog Entries
    75
    Rep Power
    143
    The location of variables allocated in C is normally determined by the compiler, not the programmer. If they are all of the same data-type you could create an array. Is there any particular reason they need to be in consecutive memory locations?
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. global variables...how to make them
    By alirezan in forum C and C++
    Replies: 1
    Last Post: 09-17-2011, 09:05 AM
  2. Best way to use global variables
    By rabintech in forum C and C++
    Replies: 5
    Last Post: 07-25-2010, 10:33 AM
  3. global variables
    By yellowzelo in forum Java Help
    Replies: 3
    Last Post: 03-08-2010, 04:39 AM
  4. Replies: 4
    Last Post: 05-21-2009, 04:47 AM
  5. Replies: 0
    Last Post: 10-01-2007, 01:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts