Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!umich!umeecs!msi.umn.edu!cs.umn.edu!kksys!edgar!mmug!p510.f22.n282.z1.mmug.edgar.mn.org!Jim.Spencer From: Jim.Spencer@p510.f22.n282.z1.mmug.edgar.mn.org (Jim Spencer) Newsgroups: comp.lang.c Subject: Array question Message-ID: <0.27BB182C@mmug.edgar.mn.org> Date: 14 Feb 91 22:57:44 GMT Sender: ufgate@mmug.edgar.mn.org (newsout1.26) Organization: FidoNet node 1:282/22.510 - SmorgasBoard, Twin Cities, MN USA Lines: 17 Robert Nelson Gasch writes in a message to All RNG> int *this_ptr; this_ptr [0] = 1; this_ptr [1] = 2; . . . RNG> this_ptr [9] = 10; RNG> This works fine, but I really don't know why?? It seems you're RNG> using memory to store an array which was never really allocated. RNG> If anybody could briefly explain what exactly happens when you RNG> do this, I'd be greatly abliged as at this point I'm mystified. You are overwriting some memory that probably belongs to something else. It is syntatically correct but you are going to get a big crash eventually. -- Jim Spencer - via The Minnesota Macintosh Users Group UUCP-Fido Gateway UUCP: ...uunet!tcnet!kksys!edgar!mmug!22.510!Jim.Spencer INET: Jim.Spencer@p510.f22.n282.z1.mmug.edgar.mn.org