If you are in a developed area (e.g., campground, parking lot, lodging area) or if a bear approaches you, act immediately to scare it away: make as much noise as possible by yelling very loudly (don't worry about waking people up if it's nighttime). If you are with other people, stand together to present a more intimidating figure, but do not surround the bear. Bear spray/pepper spray is not allowed in Yosemite. What to Do if You See a Bear - Yosemite National Park (U.S. National Park Service)
yes
yes