I have a question, pls help, thanks very much.
Try to write a C program which can analyze the input of the user in the following aspect.
4 white spaces
You must use the logic of pointer to do this analysis in a function. there are some hints for you:
1. You may get the input of the user by using statement:
This statement can get the user input until he/she presses RETURN and put the characters in an array, in this example, it is called line.
2. The prototype of the array can be like this:
void scan_line(char line, int *pv, int *pc, int *pd, int *pw, int *po);
3. Inside the function you may use function toupper(char) to change each character you get from user to uppercase before you analyze them.
4. The output of the program will be like this:
Please enter a line of text below:
Solider ! 88
no. of vowels: 3
No. of consonants: 4
no. of digits: 2
no. of whitespace characters: 2
No. of other characters: 1