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?
If you're thinking of taking CPSC 223, please do the following.
New addition: C In a Nutshell, (2nd edition) Chapters 1-7.
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.
See /c/cs223/hw1. Specifically, check out the sample file /c/cs223/hw1/Total.c
gcc --std=c99 or just: c99 most portable: gcc -ansi -pedantic
Note: must declare a function before calling it.
Here is the source code: sumRange.c