ps |grep の実行結果をkillしたいのですが
うまくいきません。
よろしくおねがいします。

main()
{
int x[1000];
int *px;
px=&x[0];

*px=system("ps |grep ppppp ");
system("kill %s",px);
}