Walmart Inc. raised its full-year sales and profit outlook, a sign the world’s biggest retailer is winning over price-sensitive shoppers while absorbing rising costs.