There are different answers here about accidentals, because there's no one correct answer. As someone noted in one answer, the modern convention is to assume that accidentals on one pitch only apply to that specific line/space, not to notes an octave above or below in the same bar.
However, this was not always the convention. And different people at different times in history and in different places may have assumed various things. Historically, it was therefore most common to be explicit about what happened to notes in other registers with the same name. If you wanted a G# and marked it sharp, but another note G occurred an octave above later in the bar, it would typically be marked explicitly with either a natural or a sharp (depending on the intent). The natural would not be merely thought of as a "courtesy" accidental, but would generally be required for the sake of clarity.
I still think this latter convention is the least confusing, and I'd recommend using it. Otherwise, unless it's a piece of modern atonal music that has odd accidentals to begin with, there's usually going to be a debate among performers -- "Is this supposed to be natural? I don't know. Maybe it's an editorial mistake and they forgot a sharp. We'll have to look at other parts...."
So, generally speaking, in a modern score with a lot of chromaticism, I'd assume that sharps and flats only correspond to their particular line/space, but honestly that convention cannot be assumed to be universally true (as seen in some other answers here). It's pretty rare to see situations where an accidental is assumed to apply in all octaves, and I think the only place I've seen it is in some really abbreviated types of notation, like lead sheet charts or some loosely edited jazz parts. (And I'm pretty sure even that is rare.)