I was playing pink Floyd's Shine on you crazy diamond. The ending note of Syd's theme (famous 4 note melody) is high E but it harmonizes with C major chord. Also how are the chords relatively higher or lower like the notes?
You have many, many options when harmonizing a melody. In this case, the E in the melody is the third in the chord used to harmonize the melody. Typically you would want to figure out what notes you are using in the melody and build your harmony around that. You would typically want to make most of your notes chord tones of you're harmony, but it's not a requirement. For example a lot of melodies like to utilize the 9th even though it's typically not part of the harmony which is fine as it gives the melody a bit of additional color when put against the harmony.
As for how high or how low you play the chord (or the register you play it in), it's largely up to you and what instrumentation you are using and the feel you want. For example a lot of funk songs like to take advance of chord shapes high on the neck because it has the tone they want which includes the chord being higher pitched while in country songs more open chords are used again for the tone and to take advantage of the lower register for that.
Very interesting question. In the example you use, a C chord is chosen to harmonize over the e note which can be played on the open high e string on guitar. So why was that particular chord chosen to harmonize with that particular note in this context? And how do you go about deciding for other songs?
One thing that is important when harmonizing notes with chords is to be sure the chord contains most of the notes that are played at the same time as the chord. In your example, there is only one note being played under the C chord so it is critically important for that chord to contain that note. The C major chord does contain an e - and in several chord voicings on guitar the melody note is in the chord at the same octave. But several other chords also contain an e. So what makes the C major chord best in this context?
Looking at the context, we can get some clues. The song in your example is predominately in the key of G minor. The chord played in the progression next to the C major chord is a G minor (or Gm7). One way that information can guide our chord choice is by following one chord in the progression with a chord that uses at least one note from the previous chord. This will often help create a smooth natural sounding transitions between chords. So in the example, the C major chord shares the g note with the adjoining G minor chord. This is particularly helpful if you are modulating to another key or borrowing a chord from the parallel key. In your example the C major may be borrowed from the key of G major which is the parallel key of G minor.
The chord played over a note will color it in a certain way or add a certain flavor (if you will). The chord you use should support the overall emotion, feel, and direction of the song.
If the solos in the song and the melody pull heavily from a particular scale, that would influence your chord choice. So if the song derives most of the melody notes in the solos from the G minor scale or G minor pentatonic scale, the chords you choose will probably fit better within the overall context of the song as a whole - if the chord contains notes that are in that predominate scale. In your example the C chord consists of notes that are found in the G minor scale (with the exception of the e which is required because that is our melody note).
The chord choices for harmonizing a melody will also be guided by the direction the melody takes the next chord. Certain chords will transition better into other chords and the chord played over a melody of several notes should contain a few of those notes. So if you have several choices of chord to play over a given section of the melody, first choose a chord that transitions well from the previous chord, then look at what the melody dictates for the chord which follows the one you are trying to solve, and choose a chord that also transitions to the next chord well. In other words, the chord you are trying to choose to harmonize with your note, should transition well from the previous chord and to the next chord (if there is a next chord).
In many cases you can use the key of the song to dictate the most commonly used chord set for that key. There are chord charts available on line for every possible key. Your Pink Floyd example is not a good one because the C chord is not typically found in the key of G minor but may be borrowed from the parallel key of G major. But most songs will fall into easily ascertainable keys and you can use the common chords for that key to help narrow down your choices.
Finally, to some extent, trial and error can work where strict methodology and formulas fail. If you know what feeling the song should evoke, use the suggestions above to give you some options, and then try several of them and use your ear to judge which one gives you the desired effect. If it sounds good, it is good.
The second part of your question seems to be about chords sounding higher or lower than the previous chord. With single notes, it is easy to hear if the following note is higher or lower. With chords, it is not always obvious to the ear, especially with guitar chords.
With guitar, there may be several positions where you can play a particular chord and still hear the emphasis on the same root bass note. Regardless of whether you play a C major chord in open first position, as a third fret A shaped barre chord, or as an E shaped barre chord on the 8th fret, it still sounds the same as far as relative pitch.
Whether a given chord sounds higher or lower than the previous chord, often depends on the context of how the chord is used to support the underlying melody. Chords consists of several notes - and with guitar, several of those notes may be repeated in octaves. Your mind will hear and perceive the relative pitch of the chord compared to the previous chord, based on which direction the melody is going.
For example - if the melody notes are going higher when you switch from a G chord to a C chord, your brain will hear the higher notes in the chord which match the melody notes and you will perceive the C as higher than the G. If on the other hand the melody notes are getting lower as you switch from G to C, the opposite will happen. Your brain will hear the C chord as it harmonizes with the lower notes and the chord itself may be perceived as lower than the G.
Or the perception can vary from one chord to the next on guitar depending on if the root note is in the bass and if the bass note of the voicing you choose is lower or higher than the bass note of the prior chord.
With piano, it's more straightforward. If we don't consider inversions - on piano if you play the next chord at a position to the right of the previous chord, it will sound higher, to the left lower.