i'll write something for you. if you want a name for input. you use scanf();
then you'll need to declare an FILE pointer. and write a buffer from the input into the FILE.
char input; // input buffer with a capicity of 9 character + 0 terminater.
FILE *fp; // FILE datatype and a file pointer (FP).
printf("Username please: ");
scanf("%s",&input); // pointer to input. to store the input from the stdio
printf("\n Your input is %s ",input);
fp = fopen("C:\\username.txt","w+");