Re: [CPP]几道C语言的题

qiaojie qiaojie at gmail.com
Sat Jan 20 16:59:49 CST 2007


老美们当初发明这几个词的时候太过草率,像call
stack虽然操作方式上类似于数据结构里的stack,但是明显是两个不同概念,用同一个词很容易概念混淆,而heap
memory就更离谱,跟数据结构里的heap完全是两码事,居然也用一个词,让人完全搞不清。中国人翻译的时候也比较粗糙,把call
stack翻译成堆栈,又让人进一步搞迷糊。
按照约定俗称的说法,堆栈就是指的call stack,而且也只有call
stack有上溢下溢的概念。堆栈下溢就是堆栈满了,当然是种错误情况,比如递归层次太深、栈对象太大等等都会造成堆栈下溢。



On 1/18/07, Shuo Chen <giantchen at gmail.com> wrote:
>
> 这里的"堆栈"是指一种自己写的或程序库提供的容器还是指函数调用栈?
>
> On 1/16/07, 孙华明 <sunhm at neusoft.com> wrote:
> >
> >
> > 作为了几道C语言的题,发现C语言知识真的很细:
> >
> > 1、为了有的公司的编码规范中要求尽量使用strncpy(),而不是strcpy()?
> >
> > 2、静态函数与非静态函数有什么区别?
> >
> > 3、堆栈下溢是一种错误状态,应该设法避免,对吗?
> >
> > 平时都在用C++,对这些概念真没多少想法,大家帮忙讨论下...
> >
> >  ________________________________
> >  Confidentiality Notice: The information contained in this e-mail and
> any
> > accompanying attachment(s) is intended only for the use of the intended
> > recipient and may be confidential and/or privileged of Neusoft Group
> Ltd.,
> > its subsidiaries and/or its affiliates. If any reader of this
> communication
> > is not the intended recipient, unauthorized use, forwarding, printing,
> > storing, disclosure or copying is strictly prohibited, and may be
> unlawful.
> > If you have received this communication in error, please immediately
> notify
> > the sender by return e-mail, and delete the original message and all
> copies
> > from your system. Thank you. ________________________________
> >
> > _______________________________________________
> > Cpp mailing list
> > Cpp at codingnow.com
> > http://codingnow.com/mailman/listinfo/cpp
> >
> >
>
> _______________________________________________
> Cpp mailing list
> Cpp at codingnow.com
> http://codingnow.com/mailman/listinfo/cpp
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codingnow.com/pipermail/cpp/attachments/20070120/a820902e/attachment.html


More information about the Cpp mailing list