12345678910111213
int main(int argc, char** argv, char *env []) { //user inputs: 1234 127.0.0.1 file.txt char fileNameBuff[100]; strncpy(fileNameBuff, argv[3], strlen(argv[3])); { size_t i; for (i=0; i<strlen(argv[3]) && argv[3] !='\0';i++) fileNameBuff[i] = argv[i]; } }
strncpy(fileNameBuff, argv[3], 100);
char fileNameBuff[100];