int len = strlen(a);
a[len-1] = 0;