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...
Type: Posts; User: iMalc
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...
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....