If I have char array[6] and my input, ABC is stored in the array, what would be the next element after ABC in the array? I tried experimenting but the result doesn't make sense.
If I have char array[6] and my input, ABC is stored in the array, what would be the next element after ABC in the array? I tried experimenting but the result doesn't make sense.
You should have "ABC" followed by a \0, and then 2 bytes of junk (could be anything).
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Got it, thanks!