It is easy to identify the tonic, subdominant and dominant degrees of any key. You only need to select the I, IV and V degrees. In the next examples, they are shown in red:
C Major: C - D - E - F - G - A - B
G Major: G - A - B - C - D - E - F#
Select the I, IV and V degrees of the following keys:
I - tonic
IV - subdominant
V - dominant
I - tonic
IV - subdominant
V - dominant
I - tonic
IV - subdominant
V - dominant
I - tonic
IV - subdominant
V - dominant