Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!cs.utexas.edu!samsung!uakari.primate.wisc.edu!dogie.macc.wisc.edu!vms.macc.wisc.edu From: yahnke@vms.macc.wisc.edu (Ross Yahnke, MACC) Newsgroups: comp.lang.c Subject: array init'ing, static or auto? Message-ID: <2679@dogie.macc.wisc.edu> Date: 12 Nov 89 04:56:27 GMT Sender: news@dogie.macc.wisc.edu Organization: University of Wisconsin Academic Computing Center Lines: 17 If I init a char array declared inside a function with a string: wubba() { char wubbaStr[] = "wubba"; ... when does actually get init'ed? When the function is called? If wubba() got called a few thousand times, would it be faster to make wubbaStr static instead? wubba() { static char wubbaStr[] = "wubba"; I'm assuming it would be cuz wubbaStr would get init'ed at program load time, and not when the function is called... any comments? >>> Internet: yahnke@macc.wisc.edu <<< >>> Mille voix chuchottent <> <<<