Skip to content

Instantly share code, notes, and snippets.

@jvns

jvns/exercise_solutions.md

Last active Aug 29, 2015
Embed
What would you like to do?
exercise_solutions.md

Exercise 1

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <unistd.h>

#include "utils.h"

int main(int argc, char **argv) {
  while(1) {
    printf("yay shell> ");
    char *line = NULL;
    size_t capacity = 0;
    getline(&line, &capacity, stdin);
    printf("%s", line);
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment