Is typedef char BUFFER[20] legal?

Paul Siu paul at tredysvr.Tredydev.Unisys.COM
Wed Jan 30 04:08:39 AEST 1991


Is the following statements legal in K&R C, and ANSI C?

     typedef char BUFFER[20];
              .
              .
              .
     BUFFER sb;

This seems to work on both the K&R compiler and the ANSI compiler at my work
place, but is this going to break when the program is ported?

Can anyone also tell me what is the most common style convention for type
names, I usually put them all in capitals.

Thanks

Paul Siu
paul at tredysvr.tredydev.unisys.com



More information about the Comp.lang.c mailing list