Such as, if I had the user input a character sequence ranging from 0-10. Is there a function that I could use with the array to return an integer value corresponding to the number of characters in the array? Including whitespaces?
If the array is a c-style string (i.e. an array of characters, with the end of the string marked by a zero value) you can use strlen.
Shamelessly stolen from wiki:
1 2 3 4 5 6 7 8 9 10 11
#include <stdio.h>
#include <string.h>
int main(void)
{
char *string = "Hello World";
printf("%lu\n", (unsignedlong)strlen(string));
return 0;
}
This program will print the value 11, which is the length of the string "Hello World".
If it's any consolation, after correcting you ne55 went on to answer a question that wasn't asked, involving counting letters (the OP wants to include whitespace in the count). ;)