Botanically any kind of pepper is a fruit. When we look at parts of a plant the pepper is the mature ovary of a flower, which make it a fruit.
The reason they are considered a vegetable in the grocery store is due to how imported vegetables were taxed. In 1893 the Supreme Court made the decision on the classification of what we now know as vegetables and fruit.
How this came to be was they classified our fruits and vegetables by when we would eat them. For taxing purposes in 1893 fruit did not have a tax applied to them, but all imported vegetables did.
This is how they classified fruits and vegetable; fruit was considered to be anything that was eaten after a meal as dessert and vegetables where anything that could be eaten during the meal.
So that is why today many people consider pepper, tomatoes and many other garden crops to be vegetables when in the botanical sense they are actually fruit.
So next time you are in the garden or in the grocery store, look at whats in the produce section. Any items that are a result of a flower (i.e. peppers, tomatoes, cucumber, melons, etc) are actually fruit and anything that is parts of a plant (i.e. carrots are roots, lettuce are leave, etc.) are vegetables.