Search:

Type: Posts; User: iMalc

Search: Search took 0.08 seconds.

  1. Thread: Sorting an array

    by iMalc
    Replies
    11
    Views
    2,199

    Are you sure about that? You are allowing k to...

    Are you sure about that?
    You are allowing k to go up to 4, and then access value[k+1] i.e. value[5]. That's out of bounds for an array with elements 0 to 4. You probably happen to be lucky that...
  2. Thread: Sorting an array

    by iMalc
    Replies
    11
    Views
    2,199

    Your code is assigning a character ('\0') to a...

    Your code is assigning a character ('\0') to a double. Whist the type promotion mechanism will allow this to work, really it is not the right thing to do, and at the very least confuses the reader....
Results 1 to 2 of 2