// Sample C program to print the alphabet // (compiler is in /opt/sfw/bin/gcc) #include // like Java import int main(char* argv, int argc) { // main function (like Java) char *str, *curr; // two "character pointers" int i = 65; // allocate some storage curr = str = (char*) malloc(sizeof(char), 26); while(i < 65+26) // make a string "by hand" *curr++ = i++; *curr = 0; // null-terminated // print a label and the string printf("\n%s\n\n", "The alphabet:"); printf("\t%s\n\n", str-3); i=65; while(i<65+26) printf("%d ",str[i++]); }