Hello I am very new to c programming; I am actually an electrical and comp. engineering tech. student.
I am trying to create a code where the user enters in a series of printable and non-printable characters. With that I have to create a piece of code to discern how many of those entered are printable or non-printable. I was thinking of using the isalpha function.
This piece of code I have only reads to the first space entered(if any). Basically any sort of constructive hints would be helpful at this point.
I have been reading the subscribed text(dietel and dietel), but it is really of no use. And I have been watching these videos teaching how to program also, but I am still facing difficulties.
Yes I do appreciate, that by the length of my code solely, it looks as though I have done nothing, but I assure you I have made multiple attempts, and by the obvious distaste for those who seek out people to write the code for them; that is not what I am asking for. To re-iterate I am just seeking some guidance.
Code:#include<stdio.h> #include<string.h> int main(void) { int count=0; int i=0; while (getchar() !='\n') count++; printf("You entered %d characters. \a", count); return 0; }