teaching machines

CS 330 Lecture 11 – Slightly Above the Machine with C

February 14, 2014 by . Filed under cs330, lectures, spring 2014.

Agenda

TODO

Code

atoi.c

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv) {
  const char s[] = "124213"; 

  int s_as_int = 0;

  int magnitude = 1;
  while () {
    s_as_int += (s[i] - '0') * magnitude;
    magnitude *= 10;
  }

  /* '6' - '0' */

  return 0;
}

Haiku

on the multiplicity of languages
Could we have just one?
As long as it’s strong enough—
To express others