Sha256: 1ee93722057e7e5ab57e3e1b650edd7efa0f2f9c0274d830eed62e9f7aea268c

Contents?: true

Size: 755 Bytes

Versions: 46

Compression:

Stored size: 755 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

46 entries across 46 versions & 1 rubygems

Version Path
trackler-2.0.6.6 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.5 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.4 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.3 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.2 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.1 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.6.0 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.5.18 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.5.17 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.5.16 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.5.15 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.5.14 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.5.13 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.5.12 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.5.11 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.5.10 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.5.9 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.5.8 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.5.7 tracks/c/exercises/word-count/src/word_count.h
trackler-2.0.5.6 tracks/c/exercises/word-count/src/word_count.h