c:\ & gt; Execute 1 1 1
If your program is called exec after compilation, the usage of your argv[ 1] in the previous line is "11". Just turn it with the atoi function.