This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
// Write a program to fold long input lines into 2 shorter lines | |
// after first nonblank character. Take care of very long lines, | |
// and if there's no blanks/tabs before column | |
// Essentially a string tokenizer | |
int length(char input[]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
/* | |
Author: Matias Lago | |
Objective: Print histogram of frequencies of different characters in input (will only print visible ones) | |
*/ | |
#define STARTING_CHARACTER ' ' | |
#define ENDING_CHARACTER '~' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define TABSIZE 8 | |
int main() | |
{ | |
int c, nchars, nspaces; | |
//nchars = number of chars, nspaces = number of spaces | |
nchars = nspaces = 0; |