C7 ( 1-3-5-flat7) is suppose to contain a G as its 5th right? So how does a guitar get away with this in open position?
You don't have enough fingers to play it.
The fifth is the most expendable note in a 7th chord (1-3-5-7).
Without the 7, it wouldn't be a 7th. Without the 3rd, it wouldn't be major or minor. Without the root, it wouldn't be the chord that it is. But the fifth doesn't contribute any vital property of the chord.
There is this other fretting option which gives you a G:
One reason why the perfect fifth can be left out is that the note is sounded within the root. It's the second harmonic, so it's there anyway, albeit in a quiet way, although some instruments will let it sound better than others.
However - there's always the option of putting in a G on the bottom string, 3rd fret, using the ring finger across the bottom two strings.A chord doesn't have to have root at the bottom, although a lot of people seem to think it does. Luser's option actually gives the opportunity to play two G notes, if the chord is barred across all six strings - another second inversion, quite acceptable and playable.