初心者の質問 - コマンド文字列で k を使用するにはどうすればよいですか?
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int k;
    for(k = 0; k < 5; k++)
    {
       // make k appear in place of USE_K_HERE
       char argv[] = "./a.out -k USE_K_HERE < test.txt";
       system(argv);
    }
}