Faskist
Tuxhead
- Joined
- Apr 25, 2005
- Sythe Gold
- 0
- Messages
- 1,869
Code:
#include <stdio.h>
int main(int argc, char *argv[]) {
int i;
for(i=1;i<argc;i++) {
printf("%s",&argv[i][0]);
if(!(i+1==argc)) {
printf(" ");
}
}
printf("\n");
}
Can take an arbitrary number of arguments, but doesn't die on 0 args (Just prints newline, which is sad). Any help on detecting a 0 number of arguments would be much appreciated.

















