#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    1
    Rep Power
    0

    Post Help: need c code that get my memory size


    hey everyone

    i need a code that get memory size

    in the end of code : printf("your memory size is:%l",size);

    and thank for all
  2. #2
  3. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,387
    Rep Power
    1871
    More cross-posting
    It would help if you used google to help you find the answer, instead of using it to find as many forums as possible to pester.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Location
    India
    Posts
    95
    Rep Power
    4
    this is not correct way of asking help.
    first u should work on code and then if u face any problem then ask here.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    3
    Rep Power
    0
    well, lets say that u have a sturcture:

    typdef struct item{
    int a;
    long b[15];
    char c[20];
    }item;

    Now lets declarate: item i;

    The size of i can be calculated with the operator sizeof().
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    26
    Rep Power
    0
    i cant understand what kind of size do you want

IMN logo majestic logo threadwatch logo seochat tools logo