This is a little known fact, but all common motor oils are compatible. You can mix them. The idea is that the armed forces do not want a vehicle to lock up because they ran out of one brand of oil and had to replace it with another. As mentioned earlier, 10-40 is a heavier grade of oil and tends to be used for older engines while 10-30 in the newer engines. Some of the smaller engines will use 10-20. It doesnt hurt to use 10-40 in an engine that normally uses 10-30 but if you use 10-30 in one that uses 10-40, it might use or leak oil. You just have to check. And yes they do have 20 - 50 for those of us trying to sqeeze the last mile out of our bucket of bolts
you have to look at the container to see the specs.
10w40 oil will work just fine. the only thing difference between 10w40 and 10w30 is the 10w40 is a heavier oil.
Generally, if the oil is rated as compatable with your vehicle you'll be OK. Expensive brand name oils might have more cleaning additives but the most important factor is the "protection rating" specified on the container, ("SH" for example). Look in your car's manual to see what rating is specified to maintain the warranty.