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.2.1.45 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.44 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.43 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.42 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.41 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.40 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.39 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.38 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.37 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.36 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.35 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.34 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.33 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.32 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.31 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.30 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.29 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.28 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.27 tracks/c/exercises/word-count/src/word_count.h
trackler-2.2.1.26 tracks/c/exercises/word-count/src/word_count.h