Search:

Type: Posts; User: laserlight

Page 1 of 20 1 2 3 4

Search: Search took 0.08 seconds.

  1. Replies
    10
    Views
    229

    Nope. People don't necessarily immediately know...

    Nope. People don't necessarily immediately know what "ALU" stands for without context (I only happened to know from reading your previous posts), and without that it is easy to guess that "mov" means...
  2. Replies
    1
    Views
    92

    You probably just need to rest your eyes and come...

    You probably just need to rest your eyes and come back after a break. It is a matter of the closing parenthesis being in the wrong place. It should have been:

    if...
  3. Replies
    10
    Views
    229

    Isn't that the kind of typo a compiler or even an...

    Isn't that the kind of typo a compiler or even an IDE's code analysis will tell you about? You shouldn't need to ask for help in finding that kind of mistakes in a forum.


    We're part of the same...
  4. Structure doesn't even bother to read the...

    Structure doesn't even bother to read the Wikipedia articles they cite: under "Syntax", that Wikipedia article states for logical OR:
    a || b
    a or b
  5. Replies
    3
    Views
    198

    What was your test input, expected output, and...

    What was your test input, expected output, and actual output?
  6. Replies
    5
    Views
    132

    You should be aware that this: summary_t...

    You should be aware that this:

    summary_t *summary_list = malloc(sizeof(summary_t) * 1);
    summary_list = NULL;
    is equivalent to:

    summary_t *summary_list = NULL;
    except that your code also has...
  7. Replies
    7
    Views
    158

    That's only the case if the left operand is...

    That's only the case if the left operand is negative, but here SIZE_MAX should be positive, and it looks like it would be unsigned.
  8. Replies
    9
    Views
    175

    They are identical except for spelling.

    They are identical except for spelling.
  9. Replies
    9
    Views
    175

    That's good to hear. For ease of reading,...

    That's good to hear. For ease of reading, *(*(A+i)+j)) should be written as A[i][j]
  10. Replies
    20
    Views
    372

    Yes, that's a bit of an issue: however, if you...

    Yes, that's a bit of an issue: however, if you look at the Wikipedia article you linked to, you can observe that the latest listed system with a known number of bits in a byte less than 8 was from...
  11. Replies
    9
    Views
    175

    Yes, but unless you're dealing with an array of...

    Yes, but unless you're dealing with an array of array of arrays, there's usually no point passing a pointer to an entire array of arrays. Hence, what you want here is a pointer to the first element...
  12. Replies
    20
    Views
    372

    flp1969 is right: the minimum permitted value of...

    flp1969 is right: the minimum permitted value of CHAR_BIT is mandated by the C standard (since the earliest edition, I believe) to be 8, and the minimum number of bits in an int or unsigned int can...
  13. Replies
    20
    Views
    372

    As I pointed out in my previous post, sizeof is a...

    As I pointed out in my previous post, sizeof is a compile-time operator, except when its operand is a variable length array.


    The C standard states that you are wrong. You must be mistaken in...
  14. Replies
    9
    Views
    175

    x would still be a pointer to the first element...

    x would still be a pointer to the first element of the variable length array
  15. Replies
    20
    Views
    372

    No, unless applied to a variable length array,...

    No, unless applied to a variable length array, sizeof is a compile-time operator.


    You did say "all systems" :p
    Plus it is still good to bother since 8 is a magic number whose meaning is...
  16. Replies
    9
    Views
    175

    Try: void display(int row, int col, int...

    Try:

    void display(int row, int col, int x[row][col])
    I rarely use VLAs so I could be mistaken, but I believe you could leave out the row in the brackets as it's the usual array decay to pointer,...
  17. Replies
    20
    Views
    372

    If a standard integer type is supported, then its...

    If a standard integer type is supported, then its limits would be defined in <limits.h>. The width wouldn't be defined there, but that's what sizeof and possibly CHAR_BIT is for.


    By...
  18. Do you understand the algorithm for counting...

    Do you understand the algorithm for counting repeats when the input is sorted (i.e., see posts #14, #17, and #18)?

    The algorithm for non-sorted input is easy: just sort, then apply the algorithm...
  19. Sorry, I don't understand what you're trying to...

    Sorry, I don't understand what you're trying to say.
  20. Replies
    20
    Views
    372

    Is this just an exercise, or are you deliberately...

    Is this just an exercise, or are you deliberately avoiding <limits.h> and <stdint.h>?
  21. What's the purpose of fun_ptr? Anyway, the...

    What's the purpose of fun_ptr?

    Anyway, the warning is legitimate: you're assigning a function pointer of one type to a function pointer of an incompatible type. You can easily fix this by changing...
  22. Okay, try it with sorted input. Does it work?

    Okay, try it with sorted input. Does it work?
  23. That's because you didn't implement the algorithm...

    That's because you didn't implement the algorithm correctly. Look carefully at what should be in which loop.
  24. Instead of guessing, why don't you go through the...

    Instead of guessing, why don't you go through the algorithm with unsorted input and see what you get, and then implement it and try it for an unsorted array to confirm?
  25. There is a small but critical piece missing...

    There is a small but critical piece missing though: after counting with the inner loop, I must be set to J in order to skip those elements that have already been counted.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4