how to kill a process with linux

C++
ps ux # list the running Process with PID
kill xxxx # hear xxxx is the process idsudo kill <PID>ps ux #list the running proccess
kill -9 <PID>
Source

Also in C++: