From: Anatoly AT delorie DOT com Newsgroups: comp.os.msdos.djgpp Subject: Re: why does this work like this (char allocation question)?? Date: 13 Aug 1997 21:56:54 -0700 Organization: None Lines: 22 Message-ID: <5su36m$cql@drn.zippo.com> References: <33EC75ED DOT 2EA9 AT primenet DOT com> NNTP-Posting-Host: p100.aqua.sci-nnov.ru To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article , "Smith says... > >when i run this: > ... > >to impatience...) it echos the input string, and prints *4* for the >size. when the string gets longer, it segs out. > It prints 4 because it's size of the pointer (yes, if you declare buffer[4], buffer is still a pointer). >why doesn't it seg out as soon as the string exceeds four characters?? > >the same thing happens if you declare the string as a pointer (*buffer). > >does a declared variable name automagically get 64 bytes of exercise >space?? > >phil > But other your questions pussled me too.