So i have this program that's supposed to count all the characters including the spaces without using strlen but it only counts the number of the first word's characters and it does not include the rest of the words after the first space.
how do i include spaces in the count?
Ok. For now, you could use a for loop if you wanted to repeat something - you already seem familiar with those.
My reason for pointing these things out is that sometimes people learn things which are non-standard, and sooner or later may find themselves using a different compiler which simply will reject the non-standard usage. Or similarly, find themselves working in an environment (or maybe at a job interview) where such usage might not be appropriate.