The notes of a C major chord are C, E, and G. To fill out the chord if the melody has a E you could play the missing notes C and G. It's the simplest and most effect way of filling in the rest of the chord. There are other options though that I will explain.
If you are playing with others you have a lot more freedom in your voicing and as long as you are playing chord tones, but if you are playing alone there are certain tones you would need to imply a chord. To imply a C major chord you need at least the C and the E. You could leave out the 5th and just play C and E. You could also add the major 7th if you want too and play C and B, but you would technically be playing a CM7 chord instead of just a C major chord. You also could probably also play C and Bb to imply a C7 which depending on what you are playing may or may not make sense.
You have a lot of options and I suggest you play around with them to hear what sounds best to you.