I am writing a piece of C code that will run some sudo command in system(\"sudo ip route ...\") function call.
sudo
system(\"sudo ip route ...\")
This call is being done in a pth
system("echo XXXX | sudo -S gedit");
Where XXXX your password.