I have problem with argc
.
Command line I sent: prog 333 jos nije kraj akademske godine
void main(int argc, char *argv[]){
char pom[40];
char *ptr;
strcpy(pom, argv[5]+3);
printf("%s;", pom);
ptr=strchr(argv[6], 'd');
printf("%s;", ptr);
printf("%d.", argc);
return 0;
}
I get j;demske;8.
Why is it 8 and not 7. I should get number of parameters sent.