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.6.27 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.26 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.25 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.24 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.23 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.22 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.21 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.20 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.19 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.18 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.17 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.16 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.15 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.14 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.13 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.12 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.11 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.10 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.9 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.8 tracks/c/exercises/word-count/src/word_count.h