Question
You are creating a new account on a website and need to come up with a username. The username has the following requirement: 1) The
You are creating a new account on a website and need to come up with a username. The username has the following requirement:
1) The username has at least 5 characters, and at most 10 characters
2) It must contain alphabetic letters (upper or lower case), digit or underscore, but no
space or other punctuations.
For example, mike_FL is valid and mike!FL is invalid
Write a program that takes a word entered by the user, check if the word is a valid username. If the input is valid, print a confirmation statement. If it is not, print a statement that the input is not valid.
1) Name your program username.c.
2) The user input ends with the user pressing the enter key (a new line character).
3) Use getchar() to read in the input.
4) You can use character handling functions such as isdigit and isalpha. Dont forget
to include ctype.h if you use any character handling functions.
Before you submit
1. Compile program with Wall. Wall shows the warnings by the compiler. Be sure it compiles on student cluster with no errors and no warnings.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started