All pastes #266567 Raw Edit

Stuff

public text v1 · immutable
·published 2006-12-04 06:57 UTC
rendered paste body
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void RandomUserName(char * oBuf, int maxlen);
int main(){
 char buffer[9];     
RandomUserName(buffer,8);
printf(buffer);
  
    return 0;
}
    
    
void RandomUserName(char * oBuf, int maxlen)
{
   
 srand(GetTickCount());	
	int randlen = (rand()%3)+maxlen;
	int i;
	for ( i=0; i < randlen; i++) 
		oBuf[i] = (rand()%26)+97;
	oBuf[i] = '\0';
	

}