program for passing number string when multiple no is print and when there are some char then it's show the output "string_error" ex - input 111222333445 output 33321
Anonymous
#include void main() { char arr[20], i, j, count; printf("\nEnter a string: "); gets(arr); for(i=0; arr[i]!='\0'; i+=count) { count = 1; for(j=i+1; arr[j] == arr[i]; j++) { count++; } printf("%d", count); } }
Check out your Company Bowl for anonymous work chats.