Results 1 to 4 of 4

Thread: Automatic storage class in C

  1. #1
    Join Date
    Jan 2010
    Posts
    29

    Automatic storage class in C

    Hello, Friends. I am the student of Bsc(Information Technology). I have the C language in my college syllabus. I don't have the good knowledge of the C language. Because of that I am finding little difficult to learn the C language. So, I just want to know about the Automatic storage class in C. I also want to know what is the purpose of the Automatic storage class in C And how they can work. I also want to know that how can I declare Automatic storage class. Can anyone is there who can help me?

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Automatic storage class

    Hi, Automatic storage class variable uses the " auto " keyword. Automatic storage class variables comes into existence wherever and whenever the variable has been declared. Automatic storage class variables are available local to a function. Because of that these varables are also called as local variables. The storage of the Automatic storage class variables is in the memory. Automatic storage class has a default value, which can be garbage value. Automatic storage class variables is local to the block in which it has been declared.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Storage class in C

    I guess you have heard about the Automatic Storage class in C. Objects of the Automatic Storage class in C are local to block and they are discarded on exit from the block.If there are no storage class section is mentioned or auto specifier is used then declaration within a block can create automatic objects. Automatic Storage class the Object are automatic if they are declared as register and If Possible they are stored in fast registers of the your machine.
    Have a Nice Day!

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Automatic storage class in C

    Hi, I think you have to refer the text book of C language for more detailed explanation. auto-Storage class is the default storage class for all the local variables.
    {
    int Cnt;
    auto int Mth;
    }
    The above example states that two variables with the same storage class. auto keyword can only be used within functions that is a local variables.

Similar Threads

  1. Replies: 8
    Last Post: 08-10-2011, 11:06 PM
  2. External Storage Class in C
    By Agustíne in forum Software Development
    Replies: 3
    Last Post: 23-01-2010, 11:51 AM
  3. What are the Static storage class in C
    By Garett in forum Software Development
    Replies: 3
    Last Post: 23-01-2010, 11:07 AM
  4. Register Storage class in C
    By Gaauge in forum Software Development
    Replies: 3
    Last Post: 23-01-2010, 10:06 AM
  5. Meaning of storage class specifiers in C++ Language
    By KALYAN23 in forum Software Development
    Replies: 3
    Last Post: 07-11-2009, 06:01 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
  •  
Page generated in 1,751,876,802.49014 seconds with 16 queries