Sorry for the late response, I had some things to do.
Code:
char out[256];
for(int i = 0; i < strlen(argv[1]); i++)
out[i] = argv[1][i];
This code works perfectly
This seems to go fine:
Code:
char var[10];
strcpy(var, *(argv+1));
When I compare the variable var with another variable the result is always false though, even when the strings are equal.
Code:
char aap[3] = "aap";
if ( strcmp(aap, var) == 0 ){
char y = 'y';
printf("%c", y);}
else{
char n ='n';
printf("%c", n);}
return 0;}