Math/buildString.c File Reference

Task to create strings to use for comparison

Execute for a fixed number of iterations the comparison of two random strings. More...

#include <stdlib.h>
#include <getopt.h>
#include <stdio.h>
#include <string.h>
#include "problem.h"

Functions

void prepareInput (int inputSize, int argc, char **argv)
 Construct a random string of size ssize and have 'str1' and 'str2' be allocated strings with the same contents.
int execute ()
 Execute by invoking malloc(numElements) a total of numT times.
void postInputProcessing ()
 No postprocessing needed.
void problemUsage ()
 No specific problem usage.

Variables

static char * str1
 First random string.
static char * str2
 Second string against which to check; will contains same value as str1.
static int psize
 Number of times to compare.
static int ssize = 10
 string size (default: 10)


Detailed Description

Task to create strings to use for comparison

Execute for a fixed number of iterations the comparison of two random strings.

Author:
George Heineman
Date:
6/15/08

Function Documentation

int execute (  ) 

Execute by invoking malloc(numElements) a total of numT times.

.numElements

output sum to be sure is correct.

void postInputProcessing (  ) 

No postprocessing needed.

void prepareInput ( int  inputSize,
int  argc,
char **  argv 
)

Construct a random string of size ssize and have 'str1' and 'str2' be allocated strings with the same contents.

void problemUsage (  ) 

No specific problem usage.


Variable Documentation

int psize [static]

Number of times to compare.

int ssize = 10 [static]

string size (default: 10)

char* str1 [static]

First random string.

char* str2 [static]

Second string against which to check; will contains same value as str1.

Algorithm Development Kit 1.0