for (int i=0; i < randlen; i++) strbuf[i] = (rand()%26)+97; strbuf[randlen] = '\0';