debian sudo without password

C++
#1. Open the /etc/sudoers file (as root, of course!) by running:
sudo nano /etc/sudoers

#2. At the end of the /etc/sudoers file add this line:
username ALL=(ALL) NOPASSWD:ALL
Source

Also in C++: