0

Hey guys,

I want to know one thing, for instance I am having a character array like this: [@@123124123123125@@@] where 123, 124 and 125 are one three-digit numbers and are NOT separate like 1,2 and 3. I want to know the number of times 123, 124 and 125 have occurred. This is my attempt so far:

```
for (int i=2; i<count-3; i++) {
for(j=i+3; j<count-3; j++) {
if ((dataPacket[i]==dataPacket[j]) && (i!=j))
{
counting=counting+3;
}
}
}
```

This is giving me huge random numbers and considering 1, 2 and 3 separately. Any help is highly appreciated.

Thanks