Code:
#include <string.h>
int main()
{
char s[] = "Hello, World!";
char c = '!';
char* found = s;
int counter = 0;
while (1)
{
found = strchr(found, c);
if (found == NULL)
break;
counter++;
found++;
}
printf("Char '%c' found %d times\n", c, counter);
return 1;
}
Sveti Avgustin: "Dobar hrišćanin treba da se kloni matematičara i svih onih koji daju lažna proročanstva. Postoji opasnost da su matematičari već sklopili pakt sa Đavolom, da pomrače čovekov um i da ga okuju okovima pakla."