ping command output to null in linux

C++
command > /dev/null
Source

Also in C++: