The original mean is given by
[tex] \displaystyle M = \dfrac{1}{N} \sum_{i=0}^N x_i [/tex]
The new mean is given by
[tex] \displaystyle M' = \dfrac{1}{N} \sum_{i=0}^N (x_i+c) = \dfrac{1}{N} \left(\sum_{i=0}^N x_i+Nc\right) = \dfrac{1}{N} \sum_{i=0}^N x_i + c = M + c[/tex]
So, the new mean is shifted by the same quantity.
This is true for the median as well: suppose the median has index [tex] \bar{k} = \left \lfloor \frac{N}{2} \right \rfloor [/tex], when all elements are arranged in increasing order. If you shift all elements by the same quantity, the former median will still be the same element, so the old median was shifted by the same quantity as well.
Example: Consider the dataset
[tex] 4, 5, 7, 8, 11 [/tex]
The mean is
[tex] \dfrac{4 + 5 + 7 + 8 + 11}{5} = \dfrac{35}{5} = 7 [/tex]
The median is the third element, so it's 7 as well.
Now, let's add 10 to every element: the dataset is
[tex] 14, 15, 17, 18, 21 [/tex]
The mean is
[tex] \dfrac{14 + 15 + 17 + 18 + 21}{5} = \dfrac{85}{5} = 17 [/tex]
The median is the third element, so it's 17 as well.
So, the new mean and median are also ten more than the old mean and median.