+ 2
Hi🤗! Can you find a bug in my code?
#include<stdio.h> #include<conio.h> #include<string.h> int count(); int main() { static char enter[20]; gets(enter); printf("sum=%d",count(enter)); getch(); } int count( sum) char *sum; { int count1=0,i=1; while((*(sum+i)!=" ")&&(*(sum+i)!='\n')&&(*(sum+i)!='\t')) { ++count1; i++; } return count1; }
2 Answers
+ 1
I want to count how many symbols are involved but it doesn’t do right🥺



