Skip to content

Instantly share code, notes, and snippets.

View rep-movsd's full-sized avatar

Vivek rep-movsd

View GitHub Profile
@kssreeram
kssreeram / table-driven-wc.c
Created November 12, 2020 08:17
Table-driven word-count in C
#include <stdio.h>
#include <stdlib.h>
int is_space[256];
int next_states[3 * 2];
int increments[3];
void initialize_tables(void) {
is_space[' '] = 1;
is_space['\n'] = 1;