If I want to create a username generator in C? How do I go about it? I do understand that the question has been asked. But, I don't see anyone asking it in C language. I think making it from a random word from the dictionary is going to be a little complicated for me to understand. I am right now only going to concentrate on a simple thing, and that is GENERATING 4 RANDOM NUMBERS. Now, before anyone says it's not secure or anything, this is purely for my curiosity and tinkering experience! I am enjoying learning C and I want to learn more.
The code that I have been able to come up with (minus the generator!) is as follows:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int randomnumbers; // this is for storing whatever random numbers I may generate
char NAME[15];
prinf("What is your first name? \n");//
scanf("%s \n", NAME);// I put it caps so that I can easily see it
printf("The username for %s is %s%d \n",NAME,NAME,randomnumbers);
return 0;
}
In case you find that the code is lacking and is of poor taste, I apologise. I am a newbie with less than a week in experience in coding. I thank you for your help and guidance.