CS712/CS812
Homework 1
Spring 2004
Due Date: January 30


The goal for this assignment is to have you read and grapple with the ANSI 1989 C standard, a real specification for a real language.

Consider the following C program:

extern const void end;
                                                                                
main()
{
  printf("%p\n", &end);
}

Is this a legal ANSI 1989 C program? Explain your answer by citing the relevant sections from the standard.

The standard is on reserve at the Engineering, Math and Computer Science library, which is currently in New Hampshire Hall. I also have a copy, which you may borrow for short periods of time.

Do compilers that you have access to properly handle this program? Be sure to try gcc on turing and cc on hypatia. Describe the results of using these compilers to compile this program.

Please turn-in your homework in class on Friday January 30. If you cannot be in class that day, please make arrangements to give me your paper in advance. No late papers will be accepted.

You are expected to do your own work on this assignment.


Last modified on January 19, 2004.

Comments and questions should be directed to hatcher@unh.edu