Middle C is the C immediately below 440 A, and is approximately 261.63 Hz.

The C note on the first fret of the B string on a guitar is middle C in actual pitch, but is notated an octave higher. Guitar is a transposing instrument and sounds (played) one octave lower than written. As others mentioned, this avoids excessive use of leger lines.

The lower 4 strings on a guitar E A D G are only one octave higher than the 4 strings on a bass.

-