Xref: utzoo comp.lang.c:40249 comp.lang.c++:14247 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!europa.asd.contel.com!wlbr!lonex.radc.af.mil!blackbird.afit.af.mil!kahuna.asd-yf.wpafb.af.mil!falcon.aamrl.wpafb.af.mil!bkottmann From: bkottmann@falcon.aamrl.wpafb.af.mil (Brett Kottmann) Newsgroups: comp.lang.c,comp.lang.c++ Subject: Re: array side-effect Summary: obvious, once you know what to look for Keywords: heh heh Message-ID: <1991Jun19.163404.168@falcon.aamrl.wpafb.af.mil> Date: 19 Jun 91 21:34:04 GMT References: <91165.095327PRD3@psuvm.psu.edu> <1991Jun14.184344.6066@agate.berkeley.edu> Organization: Logicon Technical Services, Inc. Lines: 27 In article <1991Jun14.184344.6066@agate.berkeley.edu>, c60b-4fd@web-4f.berkeley.edu (Dave Zoss) writes: > In article <91165.095327PRD3@psuvm.psu.edu> PRD3@psuvm.psu.edu writes: >>I have found a real stumper. >>Partial listing follows: >>... >>int CODE_MATRIX[26][25]; //global > > (code deleted) > >>This last statement changes the value of CODE_MATRIX[26][1] > > When declaring arrays in C or C++, the number in brackets specifies the SIZE > of the array. The indices, therefore, range from 0 to SIZE-1. > > The cell CODE_MATRIX[26][1] does not exist. > What a great exam question (or employee quiz)!!!! ;) Brett =============================OFFICIAL=DISCLAIMER================================ The opinions and views expressed here are strictly my own and do not necessarily reflect the official position of either the U.S. Air Force or its contractors. =====================DO=NOT=REMOVE=TAG=UNDER=PENALTY=OF=LAW===:)================