i have a code assignment which require a few code to be writen (i m new to c programming)
anyway heres the question, need to perfect it
2 more code posted below
write a c program to count the number of words in its input, where a"ward" is defined as any continuous sequence of non-whitespace characters
input:"+++ --- hi bye 879+3"
output:" the string has 5 words.
("+++","---","bye", and "879+3")
heres my code
if(str[i]==' '&&(str[i+1]!=' '))
printf("The string has %d words ",num);
printf("The string has %d words",num);
the 3rd program i have no idea how to write at all
please help me asap
i'm using dev c++ to write the code
thankyou v. much!