Search:

Type: Posts; User: Nwb

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    20
    Views
    14,167

    Did you mean to say that memory available in...

    Did you mean to say that memory available in stack is limited compared to heap (I got this impression because the discussion was about allocating memory on the heap)?

    If so, why would that be? I...
  2. Replies
    20
    Views
    14,167

    Is it necessary to call free() when you're about...

    Is it necessary to call free() when you're about to reach program termination? The entire program is about to be unloaded anyway..
  3. Replies
    8
    Views
    9,026

    thanks all

    thanks all
  4. Replies
    8
    Views
    9,026

    global constants too?

    global constants too?
  5. Replies
    8
    Views
    9,026

    Since #define doesn't allocate any memory as...

    Since #define doesn't allocate any memory as const int does, why don't we use #define for all our global constants?

    When to and when not use #define?
  6. Replies
    8
    Views
    9,026

    #define for constants?

    I have a bunch of constants:


    const int SCREEN_WIDTH = 500;
    const int SCREEN_HEIGHT = 500;

    const int MAZE_WIDTH = 21;
    const int MAZE_HEIGHT = 21;

    const int TILE_SIZE = 50;
  7. Replies
    4
    Views
    5,879

    I understood, thanks

    I understood, thanks
  8. Replies
    4
    Views
    5,879

    I had just read about streams. I had read that...

    I had just read about streams. I had read that the stdin was line buffered in my compiler. So I thought the reason getchar() didn't immediately read the character was because of this line buffering....
  9. Replies
    4
    Views
    5,879

    getchar() with an unbuffered stdin

    #include <stdio.h>

    int main() {

    setvbuf(stdin, NULL, _IONBF, 0);

    int input;
    input = getchar();

    printf("\n%c", input);
  10. Replies
    4
    Views
    5,399

    thanks salem.

    thanks salem.
  11. Replies
    4
    Views
    5,399

    But won't different processors have different...

    But won't different processors have different instruction set? How does the assembler figure out what the instruction set of the processor is?
  12. Replies
    4
    Views
    5,399

    C programs into machine code

    How do C compilers convert C source code into machine code? Does the C compiler convert its code into assembly language and then automatically find and use the assembler for that particular processor...
  13. Replies
    13
    Views
    5,609

    ok, thanks for replying Fred. @thmm thanks for...

    ok, thanks for replying Fred.

    @thmm thanks for replying, yeah, looks like linked nodes are the way to go.
  14. Replies
    13
    Views
    5,609

    One more question. void destroy_queue (...

    One more question.



    void destroy_queue ( QUEUE *q, void ( *dtor ) ( void * ) )
    {
    NODE *n;

    while ( q->head )
    {
  15. Replies
    13
    Views
    5,609

    Ok, thanks Fred and Malcolm. :D

    Ok, thanks Fred and Malcolm. :D
  16. Replies
    13
    Views
    5,609

    Thanks Malcolm. " It can't send a message to...

    Thanks Malcolm.

    " It can't send a message to stderr because that might not make sense in the context of the program."
    I didn't understand this sentence.
  17. Replies
    13
    Views
    5,609

    Thanks a lot for replying flp1969! Wow. It's...

    Thanks a lot for replying flp1969!
    Wow. It's really amazing. I never knew you could do stuff like that (the polymorphism). That's a really neat hack, thanks a lot.

    Took me some time to...
  18. Replies
    5
    Views
    4,094

    Thanks a lot Malcolm McLean and john.c! So it's...

    Thanks a lot Malcolm McLean and john.c! So it's better to use the standard library whenever possible huh?
    my 200th post. yey.
  19. Replies
    13
    Views
    5,609

    Need Tips - My Queue Implementation

    I've implemented a Queue Data Structure which stores struct Coordinate data elements.

    struct Queue is the structure which stores the queue.
    -> It has a size to represent the queue's size
    (is it...
  20. Replies
    5
    Views
    4,094

    Wow that is complicated.. thanks

    Wow that is complicated.. thanks
  21. Thank Salem, hamster_nz and laser light.

    Thank Salem, hamster_nz and laser light.
  22. modifying string literal, identifying whether char* points to malloced

    char* my_string = "oello world";
    my_string[0] = 'h';

    printf("%s", my_string);


    This snippet gives me a "Segmentation fault" in onlinegdb.com's C compiler. Why does it give a...
  23. Replies
    5
    Views
    4,094

    How is tolower() implemented if..

    How is tolower() implemented by the standard library if alphabets are not guaranteed to be continuous?
  24. Replies
    17
    Views
    12,253

    Lag does Lag

    Lag does Lag
  25. Replies
    17
    Views
    12,253

    Yes I saw that the text is formatted. But how...

    Yes I saw that the text is formatted. But how does he copy the formatting as well?
    I use Visual Studio too.
Results 1 to 25 of 224
Page 1 of 9 1 2 3 4