The meaning of the c in calloc
The meaning of the c in calloc was vividly discussed in comp.lang.c in October 2000 (see here), with both clear (because, unlike malloc, calloc clears the memory it returns) and count (because, unlike malloc, calloc is passed a count of elements to allocate) suggested as possible explanations, however without real evidence for either. Other suggestions were (along with several less serious ones) contiguous, core, commit, chunk, and character, the latter because in early versions of K&R C, calloc was the only allocation function in the library (and had an accompanying cfree). For the same reason, it was even suggested that the c simply stand for the C programming language. So, the etymology of calloc still isn't proven, and if anybody has any definite evidence as to its meaning, I'd highly appreciate learning about it.
Ïà¹ØÎĵµ£º
Ç°ÌìÍíÉÏÓöµ½Ò»Ì⣬±àд³ÌÐòÇó³ö×î´ó¹«ÒòÊý£¨×î´ó¹«Ô¼Êý£©£¬±¾ÄܵÄÎÒÏëÆðÀ´ÁËÊýѧÖÐÇó×î´ó¹«ÒòʽµÄ·½·¨£¬¿ÉÊÇÔÚ³ÌÐòʵ¼ùÉÏ
Ã÷ÏԵijöÁËÎÊÌ⣬Á½¸öÊýÒªÒ»¸öÒ»¸öµÄ½øÐвð½â£¬È»ºóÕÒµ½ÏàͬµÄ£¬Õâ¸ù±¾ÊÇÒ»ÌõËÀ·£¬Ë¼Ë÷Ò»Ò¹ÐÑÀ´£¬Í»È»±Å·¢Áé¸Ð£¬¿ÉÒÔ
ÓÃÁ½¸öÊý½øÐÐÈ¡ÓàÔËË㣬Èç¹ûÓàÊýΪÁãÔò×î´ó¹«ÒòÊýΪ±»³ýÊý£¬²»ÎªÁãÔòÓàÊýΪ×î ......
»ªÇåÔ¶¼û 2010-01-22 09:21 ×÷ÕߣºÍõæ©æ©,»ªÇåÔ¶¼ûǶÈëʽѧԺ½²Ê¦¡£
ÔÚǶÈëʽ¿ª·¢ÖУ¬×÷Ϊµ×²ã¿ª·¢Õߣ¬¸ü¿´ÖصÄÊÇCÓïÑԵıà³ÌÄÜÁ¦£¬µ«×÷ΪӦÓóÌÐòµÄ¿ª·¢Õߣ¬ÎÒÏëѧϰC++»¹ÊÇÓбØÒªµÄ¡£ÄãÖ»ÓÐÔÚÁ˽âÁË£Ã++µÄÌØÐÔ£¬´Ó±¾ÖÊÉÏ¿´µ½ËüÓëCµÄÇø±ð²ÅÄܼᶨÄãÈÏʶѧϰËüµÄ¾öÐÄ¡£ÎÒ²»ÊÇ× ......
@echo --------------------- ÓÃÓÚ¡¶Ò»¸ö²Ù×÷ϵͳµÄʵÏÖ¡·µÄ cmd ---------------------
@echo off
mode con cols=80 lines=60 ::Ç°Ò»¸öÊý×Ö»ò×ÖĸΪ±³¾°É«£¬ºóÒ»¸öÊý×Ö»òÕß×ÖĸΪǰ¾°É«£¬ÏÂÃæÊÇһЩÑÕÉ«¶ÔÓ¦µÄÊý×Ö»ò×Öĸ£º
::0£½ºÚ¡¢1£½À¶¡¢2£½ÂÌ¡¢3£½Ç³ÂÌ¡¢4£½ºì¡¢5£½×Ï¡¢6£½»Æ¡¢7=°×¡¢8=»Ò¡¢9=µÀ¶¡¢A£½µ ......
[This was posted to comp.lang.c by its author, David Anderson, on 1994-05-06.]
The ``Clockwise/Spiral Rule''
By David Anderson
There is a technique known as the ``Clockwise/Spiral Rule'' which enables any C programmer to parse in their head any C declaration!
There are three simple steps to fo ......