The melody of sentence B rises at the end, making it a question.
In languages like English, we call these sentence melodies intonations.
All spoken languages have intonations.
What is intonation?
Intonation is a term used to refer to the distinctive use of different patterns of pitch that carry meaningful information.
Pitch is the rate of vibration of the vocal folds. When we speak, normally the pitch of our voice is constantly changing. We describe pitch in terms of high and low.
One-syllable utterance:
Two common examples of one-syllable utterances are ‘yes’ and ‘no’. We have a number of choices for saying these words using different pitch patterns.
The two words can be said with the pitch remaining at a constant level (level intonation) which is not common, or with the pitch changing from one level to another (moving intonation) which is more natural.
falling intonation means that the pitch decreases with time.
Syntactic Function
If the same utterance is produced with different intonation, the meaning conveyed will be different. This difference is signaled by intonation patterns.
In English, such different intonation patterns have different syntactic functions. One sentence can be a question, a declarative statement, an expression of surprise, or an expression of doubt. Compare:
In English, the utterance ‘It is a cat’ will be regarded as a statement when there is a fall in pitch, and the same utterance will be regarded as a question if the pitch rises.