Search:

Type: Posts; User: Sabidos

Search: Search took 0.00 seconds.

  1. Difference between NULL, (void *)0 and (char *)0

    I'm not sure I really get the difference between NULL, (void *)0 and (char *)0.

    According to the C standard:




    So does that mean that those values can be used on pointers of any type? For...
  2. Replies
    12
    Views
    5,316

    Oh, OK. Like I said I have absolutely no idea...

    Oh, OK. Like I said I have absolutely no idea about assembly... So I was just curious why they were passed like that.

    Thank you very much Salem and aGerman for your help. I will do my best to keep...
  3. Replies
    12
    Views
    5,316

    And if I define it as...

    And if I define it as ((size_t)0xffffffffffffffffULL) why is its value -1 on line 19, and 4294967295 on line 41? Shouldn't it be the same? Why is it passing a negative value to a type that is...
  4. Replies
    12
    Views
    5,316

    Nope. Adding _Noreturn gives the same output....

    Nope. Adding _Noreturn gives the same output. Actually, I use Debian stable and the package is not the latest version available online, so come to think of it, maybe newer versions recognize this....
  5. Replies
    12
    Views
    5,316

    Good point. Really, even though I asked about...

    Good point. Really, even though I asked about memory allocated, it could be any resource that need to be freed. FILE* streams returned by fopen() come to mind. For the sake of simplicity, let's...
  6. Replies
    12
    Views
    5,316

    Freeing memory before exit

    Is it a good practice to free memory before exiting the program? I've read many places online that since modern operating systems reclaim all resources before exiting, there's no need to free memory....
Results 1 to 6 of 6