Pergunta de entrevista da empresa CreatioSoft

Write a program to print the number of words in a string

Resposta da entrevista

Sigiloso

5 de ago. de 2017

#include int main(){ char a[50]; scanf("%[^\n]s",&a); int count=1,i=0; while(a[i]!='\0'){ if(a[i]==' ') count++; i++; } printf("%d",count); }