Garbage at the end of a string

When I try to print a string of length K on the console I get another garbage character followed by a quote "

For example if the string is of length 4 and I expect it to be

X6Ra

I instead get

X6Ra-"

So you can see the 2 extra characters at the end.

Is " expected? Is it always there when you print a string?
And how about the - ?

What gives? I read something about an extra character at the end of strign and such but I'm confused. Anyone can point me to the answer?

Thanks.
hmm thats weird i've never had that happen
not even the quote " at the end?
It is because you are doing something uncouth to your string.
Show us the code and we'll help you fix it.
Topic archived. No new replies allowed.