University of Arizona, Department of Computer Science

CSc 453: nano-C

Nano-C is a small subset of μC, which is itself a small subset of C. It is intended to serve as an intermediate milestone for some of your programming assignments rather than as a compilation goal in itself; for this reason this document specifies nano-C somewhat informally.

The Language

Nano-C programs are limited to the following features of μC:

Examples

The following are some examples of nano-C programs.

Example 1

int x;
void foo(void)
{
  x = 0;
}

Example 2

int x, y;
char z;
extern void println(int z);
void f(int x)
{
  x = 1;
  z = x;
}