Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/18/12 08:33
Read: times


 
#187409 - Variables don't move just because you assign to them
Responding to: ???'s previous message
Your int iSize is a global variable without any assign - so BSS.

When you - inside the function assigns the value 8, iSize will not randomly jump from BSS into DATA.

Next thing - MAX_STRINGS isn't a variable and doesn't really relate to the compiler. It relates to the preprocessor. So the answer where variables are stored are the same if you remove the #define MAX_STRINGS line, and manually replace MAX_STRINGS with 128 inside the source code. You have read up about the preprocessor, haven't you?

List of 21 messages in thread
TopicAuthorDate
Memory Organization            01/01/70 00:00      
   Tried any good C book lately?            01/01/70 00:00      
      I am using Dennis Ritchie_ANCI C            01/01/70 00:00      
         Variables don't move just because you assign to them            01/01/70 00:00      
            can we start from ZERO........            01/01/70 00:00      
               Have you read my original post?            01/01/70 00:00      
               mixing stuff            01/01/70 00:00      
                  where it will be for MCU?            01/01/70 00:00      
                     is there any book for this fundamental things?            01/01/70 00:00      
                        and ....            01/01/70 00:00      
                     In this a general or Specific Question            01/01/70 00:00      
                        its General Que ????            01/01/70 00:00      
                           Separate "the C view of program" from "microcontroller view"            01/01/70 00:00      
                           NO!            01/01/70 00:00      
                              why not??            01/01/70 00:00      
                                 No - generic isn't meaningful            01/01/70 00:00      
                                 Interview questions can be asked out of limited knowledge            01/01/70 00:00      
                                    Seldom "one" answer other than to trivial questions            01/01/70 00:00      
   In Addition            01/01/70 00:00      
      Embedded?            01/01/70 00:00      
   sometimes, usually            01/01/70 00:00      

Back to Subject List