Final answer:
The literary device used in the given examples is alliteration, which involves the repetition of initial consonant sounds in neighboring words to create a musical effect.
Step-by-step explanation:
In the given examples, the literary device used is alliteration. Alliteration is characterized by the repetition of the same initial consonant sounds in two or more neighboring words or syllables. The classic example provided, 'Sally sells sea shells by the sea shore,' demonstrates alliteration through the repeated 's' sound at the beginning of most words. This device is often used to create a musical or rhythmic effect in poetry and prose, reinforce meanings, and tie together thoughts and ideas within a text.