Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!iuvax!uxc!uxc.cso.uiuc.edu!m.cs.uiuc.edu!s.cs.uiuc.edu!pathak From: pathak@s.cs.uiuc.edu Newsgroups: comp.lang.c Subject: Re: Portability help Message-ID: <207600014@s.cs.uiuc.edu> Date: 14 Feb 89 20:33:00 GMT References: <376@lakesys.UUCP> Lines: 15 Nf-ID: #R:lakesys.UUCP:376:s.cs.uiuc.edu:207600014:000:540 Nf-From: s.cs.uiuc.edu!pathak Feb 14 14:33:00 1989 Your professor seems to be assuming that the complier will initialize each var in consecutive memory location. TC1.5 did that so: printf("%s",&a); gave you 123456789. However the Unix machine didn't use consecutive memory locations so you got the kludge. The reason Turbo gave you a 10a for an answer is that it read in your return key. Why it did this is a mystery. The Unix version worked correctly because it gave you a null which is the proper terminated of an input stream. Heeren Pathak s.cs.uiuc.edu zaphod.ncsa.uiuc.edu