Search:

Type: Posts; User: john.c

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. You need to maximize the warning level of your...

    You need to maximize the warning level of your compiler, pay attention to the warnings, and fix them. You have four unused variables in checkWord and you don't return anything from firstHalfNumber or...
  2. Ultra-Deep Field, obviously! Speaking of which,...

    Ultra-Deep Field, obviously!
    Speaking of which, why is this galaxy so yellow?
    https://upload.wikimedia.org/wikipedia/commons/e/e1/UDF423-SpiralGalaxy.jpg
  3. Replies
    8
    Views
    153

    You have no idea what you are talking about. But...

    You have no idea what you are talking about. But since you are convinced that you do, there's no point in my continuing the discussion. Good luck with that.
  4. Replies
    8
    Views
    153

    You are misunderstanding what "undefined...

    You are misunderstanding what "undefined behavior" means. It doesn't mean that it won't work or will definitely blow up in every implementation of the language. It just means that the standard itself...
  5. Replies
    19
    Views
    418

    You don't like Star Trek ?!?! 16291

    You don't like Star Trek ?!?!

    16291
  6. Replies
    15
    Views
    367

    16289 Don't make me resort to the double!...

    16289

    Don't make me resort to the double!
    (Read Salem's last post again! )
  7. Replies
    4
    Views
    298

    You say "could" leave out the terminating...

    You say "could" leave out the terminating semicolon, but you mean "must" leave out the terminating semicolon, or else the following will not work:


    if (b)
    WAIT_FOR_PERIPH(); // the...
  8. Replies
    19
    Views
    418

    16288

    16288
  9. Replies
    19
    Views
    418

    16287

    16287
  10. Replies
    19
    Views
    418

    16286

    16286
  11. Replies
    15
    Views
    367

    Yes.

    Yes.
  12. Replies
    5
    Views
    194

    Malcolm makes a very important point that I...

    Malcolm makes a very important point that I totally forgot about.
    It is "undefined behavior" to use a pointer to access memory that has been freed.
    In principle, anything can happen.
  13. Replies
    5
    Views
    194

    #include #include int...

    #include <stdio.h>
    #include <stdlib.h>

    int main()
    {
    int *ptr; //This pointer will hold the base address of the block created
    int n, i;

    //// since ptr has not been initialized...
  14. Replies
    15
    Views
    367

    Look at Salem's post. As for your other...

    Look at Salem's post.

    As for your other questions, I assume you meant:


    // 1
    typedef struct {

    } TASK_MANAGER;
  15. Zeroing the tm struct sets all the fields to 0...

    Zeroing the tm struct sets all the fields to 0 and yields the date that you see (the year value has 1900 added to it and the month value has 1 added to it for display purposes). However, that date is...
  16. Replies
    3
    Views
    147

    Not a stupid question at all. There's a few...

    Not a stupid question at all. There's a few solutions.

    You could make your input buffer reasonably large so it is unlikely to be too small. If you need to store many strings you can dynamically...
  17. Replies
    15
    Views
    367

    fun_ptr is a pointer that can point to a function...

    fun_ptr is a pointer that can point to a function with the given signature. The way you have it, not only does it have the wrong signature, but it doesn't even point to anything since you haven't...
  18. Replies
    3
    Views
    204

    No he can't send you the code. You have to do it...

    No he can't send you the code. You have to do it yourself.

    Another solution is a count of repeated symbols. You just need a "last_flip" value initialized to an unused value (e.g., -1), and a...
  19. Replies
    7
    Views
    169

    Show your attempt. The first two questions...

    Show your attempt.

    The first two questions are rather simple-mineded. Obviously the minimum is 3, and the maximum is, what, a gazillion? It's a stupid question.
  20. Thread: memcmp ?

    by john.c
    Replies
    6
    Views
    231

    Why would you expect some random byte at memory...

    Why would you expect some random byte at memory location 0xFF would equal 0xFF?
    I would expect a segfault, actually.
  21. So the size of the value array could be trillions...

    So the size of the value array could be trillions of characters?
    Are you sure your computer has enough memory?
    Maybe you should look at the problem description again.
    Usually there are constraints...
  22. Okay, that makes sense now. I think you will...

    Okay, that makes sense now.

    I think you will need a kind of "floodfill" algorithm.
    (Hopefully someone else will suggest a simpler solution if it exists.)
    The floodfill function is recursive....
  23. You say "C language", but you mean "C++...

    You say "C language", but you mean "C++ language". Although they are related, they are radically different.

    In player 1's score, I see where the 9 and the two 1's come from, but where does the 2...
  24. Really? Try this: ...

    Really? Try this:


    1017803105208811141547706054010446761424659440478753690892748944869985260751624643110487274054409671

    Obviously his extremely simple example number can be factored in a...
  25. In 1 to 2 seconds? You don't.

    In 1 to 2 seconds?
    You don't.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4