Wanted to make this a comment on Peter's accepted post but can't, due to too few points. Apologies if this break some written or unwritten rule.
The trouble with "ping" is that it's not strictly a name server lookup tool (like nslookup) - for instance if you ping a hostname, it can be resolved to an IP address by a number of methods: DNS lookup, host file lookup, WINS (god forbid) or NetBIOS broadcast. It can also be a potentially out-dated cached result.
The order in which the methods are tried, depends on the clients' TCP/IP configuration and node type flag.
Microsoft online documentation does not specify what methods the ping command uses for name-to-IP resolution and vice versa.
If the resolution method is of no concern, use
ping -a w.x.y.z
or
nslookup w.x.y.z
as you please. If you need to be sure you're querying your DNS server for the correct name, use nslookup.