Which of the following is an example of bartering?

A. Buying a candy floss at a supermarket for Rs 20
B. Trading a cup of oil for a cup of pulses
C. Donating $2000 for charity
D. Trading $5 for a chocolate bar with your friend