Sha256: 8b003066655584d41cad6f2eceaf20659e610f591791770f065aa718683c441d

Contents?: true

Size: 756 Bytes

Versions: 14

Compression:

Stored size: 756 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 word_count_word {
   char text[MAX_WORD_LENGTH];
   int count;
} word_count_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, word_count_word_t words[MAX_WORDS]);

#endif

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
trackler-2.2.1.59 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.58 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.57 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.56 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.55 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.54 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.53 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.52 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.51 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.50 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.49 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.48 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.47 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.46 tracks/c/exercises/word-count/src/word_count.h