#include <stdio.h>
#include <string.h>

void hoge(const char *p)
{
	int	i;

	for (i = strlen(p) - 1; 0 <= i; i--) {
		if (p[i] == '.') break;
	}
	printf("%s=%d\n", p, i);
}

int main()
{
	hoge("a.c");
	hoge("abc");
	return 0;
}
