When notating a piano score, and a C diminished seventh chord must be notated, I do not know what conventions to follow. How does the key signature govern the notation? For example, assume the music is in the key of C. If so, as I understand it, the following be correct: C--Eb--Gb -- A. Would it be acceptable to identify the notes as C -- D# -- F# -- A? Suppose the music were in the key of Ab (four flats)?
How you spell chords does not depend on the governing key signature. Instead, you want to spell chords how they function.
But before I explain that, let's address the C fully diminished seventh chord. Keep in mind that these are tertian sonorities, meaning they are built in thirds. This means you want each note to be spelled a third above the previous note. As such, a C fully diminished seventh chord is properly spelled
C E♭ G♭ B♭♭, because each note is a third above the prior note.
Spelling that last pitch as an A technically wouldn't work, because G♭ to A is only a second. If you spell that pitch with an A, you're actually spelling an A fully diminished seventh chord, because the stacked thirds are built on A:
A C E♭ G♭. Similarly, your
C D♯ F♯ A is really a D♯ fully diminished seventh chord.
Now, back to the first paragraph, when I say you want to spell chords the way that they function. One role of fully diminished seventh chords is to resolve to a chord a half step above the diminished chord's root. As such, if the next chord is D♭, you'll want to spell it as a C diminished seventh chord. But if the next chord is B♭, it's better to spell it as an A diminished seventh chord to show the half-step relationship between the diminished seventh chord and the next chord.
The C dim7 chord is 'properly' spelt C, Eb, Gb, Bbb. A pile of minor thirds, encompassing the interval of a diminished 7th.
In practice, it will often be spelt C, Eb, Gb, A, or even C, Eb, F#, A. Not because it's harmonically correct, but because it's easier to read. And, in practice, although we're quite fussy about not mis-spelling leading notes and minor 7ths - a G#7 chord includes B# not Ab, a Db7 chord has Cb not B - we don't fuss so much over correct spelling of diminished 7th chords.
The rules may be applied more rigorously in a harmonic analysis of course. And some jazz players tolerate, or even prefer, spellings that obscure the function of a leading note, writing e.g. an F# scale with F natural and F# instead of E# and F#. (Alto sax players DO find themselves in this territory, particularly in guitar-based styles!)