[Home]

CS 223 - Spring 2017. 1/23

Welcome to CS 223!

Logical problem of the day

lp0123.c
int main(void) {
  int ndigit[5] = { 0 };
  for (int i = 0; i <= 5; i++)
    printf("%d\n", ndigit[i]);
}
What is interesting (or disturbing) about the above code?

Lecture 3: Introduction to C: make and program structure

If you're thinking of taking CPSC 223, please do the following.

Administrivia

  • Office hours:
    We have added the public tests for assignment 1. In addition, we have met ULAs and scheduled office hours. The office hours are Sun/Tue/Thu 8-11 PM at Hillhouse 17 Rm 111. Also, we will hold a tutorial to cover zoo and UNIX fundamentals from 7-8 PM this Sunday.

    Lecture Starts Here

    See /c/cs223/hw1. Specifically, check out the sample file /c/cs223/hw1/Total.c

    more make

    Here is a sample Makefile that demonstrates the basic functions of make.

    The C Programming Language

    Aspnes: C For this class, you may use C99 per gcc.
    gcc --std=c99
      or just:
    c99
      most portable:
    gcc -ansi -pedantic
    

    C program structure

    Aspnes: C Program Structure

    Note: must declare a function before calling it.

    Here is the source code: sumRange.c


    [Home]