Sha256: 09bc5ba881315f04d18e843344ddf864432d1d4d1342953ee7c0aef1e54bdac4

Contents?: true

Size: 753 Bytes

Versions: 201

Compression:

Stored size: 753 Bytes

Contents

#ifndef WORD_COUNT_H
#define WORD_COUNT_H

#define MAX_WORDS 20            // at most MAX_WORDS will be found in the test input string
#define MAX_WORD_LENGTH 50      // no individual word will exceed this length

// results structure
typedef struct WordCount_Word {
   char text[MAX_WORD_LENGTH];
   int count;
} WordCount_Word_t;

// word_count - routine to classify the unique words and their frequency in a test input string
// inputs:
//    input_text =  string no longer than will take (MAX_WORDS * MAX_WORD_LENGTH)
//    words = allocated structure to record the words fourn and their frequency
//
// outputs:
//    uniqueWords - number of words in the words structure
int word_count(char *input_text, WordCount_Word_t words[MAX_WORDS]);

#endif

Version data entries

201 entries across 201 versions & 1 rubygems

Version Path
trackler-2.0.8.43 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.42 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.41 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.40 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.39 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.38 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.37 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.36 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.35 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.34 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.33 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.32 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.31 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.30 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.29 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.28 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.27 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.26 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.24 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.8.23 tracks/c/exercises/word-count/src/word_count.h