⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 faqcatccbd.html

📁 this is a mirrored site c-faq. thought might need offline
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<a href="../../resources/fn86.html" rel=subdocument>[footnote]</a>.)<hr><hr><hr><a name="lintvsansi"><h1>comp.lang.c FAQ list<font color=blue>&middot;</font><a href="../../resources/lintvsansi.html"><!-- qtag -->Question 18.8</a></h1><p><font face=Helvetica size=8 color=blue><b>Q:</b></font>Don't ANSI function prototypes render <TT>lint</TT> obsolete?</p><p><hr><p><font face=Helvetica size=8 color=blue><b>A:</b></font>Not really.First of all,prototypes workonly ifthey are present and correct;an inadvertently incorrect prototype is worse than useless.Secondly,<TT>lint</TT> checks consistency across multiple source files,and checks data declarations as well as functions.Finally,an independent program like <TT>lint</TT> will probably alwaysbe more scrupulous at enforcing compatible, portable coding practicesthan will any particular, implementation-specific,feature- and extension-laden compiler.</p><p>If you do want to use function prototypes instead of <TT>lint</TT>for cross-file consistency checking,make sure that you set the prototypes up correctly in header files.See questions <a href="faqcatd3c2.html?sec=decl#decldef">1.7</a> and <a href="faqcat204f.html?sec=cpp#hfiles">10.6</a>.<hr><hr><hr><a name="tutorials"><h1>comp.lang.c FAQ list<font color=blue>&middot;</font><a href="../../resources/tutorials.html"><!-- qtag -->Question 18.9</a></h1><p><font face=Helvetica size=8 color=blue><b>Q:</b></font>Are there any C tutorialsor other resourceson the net?</p><p><hr><p><font face=Helvetica size=8 color=blue><b>A:</b></font>There areseveralof them:</p><p>Tom Torfs has a nice tutorial at<a href="http://cprog.tomsweb.net/"><TT>http://cprog.tomsweb.net</TT></a>.</p><p>``Notes for C programmers,''by Christopher Sawtell,areavailable by ftp from<a href="ftp://svr-ftp.eng.cam.ac.uk/misc/sawtell_C.shar">svr-ftp.eng.cam.ac.uk</a>and<a href="http://www.eskimo.com/forbidden.html">garbo.uwasa.fi</a>,or on the web at<a href="http://www.fi.uib.no/Fysisk/Teori/KURS/OTHER/newzealand.html">www.fi.uib.no</a>.</p><p>Tim Love's ``C for Programmers''isavailableby ftpfrom svr-ftp.eng.cam.ac.uk in the misc directory.An html version isat<a href="http://www-h.eng.cam.ac.uk/help/tpl/languages/C/teaching_C/teaching_C.html"><TT>http://www-h.eng.cam.ac.uk/help/tpl/languages/C/teaching_C/teaching_C.html</TT></a>.</p><p>The<a href="http://www.coronadoenterprises.com/">Coronado Enterprises</a>C tutorialsareavailable on Simtel mirrors in pub/msdos/cor on the web at<a href="http://www.coronadoenterprises.com/tutorials/c/index.html"><TT>http://www.coronadoenterprises.com/tutorials/c/index.html</TT></a>.</p><p>There is a web-based courseby Steve Holmes at<a href="http://www.strath.ac.uk/IT/Docs/Ccourse/"><TT>http://www.strath.ac.uk/IT/Docs/Ccourse/</TT></a>.</p><p>Martin Brownhas C course material on the web at<a href="http://www-isis.ecs.soton.ac.uk/computing/c/Welcome.html"><TT>http://www-isis.ecs.soton.ac.uk/computing/c/Welcome.html</TT></a>.</p><p>On some Unix machines you can try typing ``<TT>learn&nbsp;c</TT>''at the shell prompt(but the lessons may be quite dated).</p><p>Finally,the author of this FAQ listonce taughta couple ofC&nbsp;classesand hasplacedtheir notes on the web;they are at<a href="http://www.eskimo.com/~scs/cclass/cclass.html"><TT>http://www.eskimo.com/~scs/cclass/cclass.html</TT></a>.</p><p>[Disclaimer:Ihave not reviewedmany ofthese tutorials,andI gather that they tend to containerrors.With the exception of the one with my name on it,I can't vouch for any of them.Also, this sort of information rapidly becomes out-of-date;these addresses may not work by the time you read this andtry them.]</p><p>Several ofthese tutorials,plus a great deal of other information about C,are accessible via the web at<a href="http://www.quut.com/c/"><TT>http://www.quut.com/c/</TT></a>.</p><p>Vinit Carpentermaintainsa list of resources for learning C and C++;it is postedto comp.lang.c and comp.lang.c++,andarchived wherethis FAQ listis(see question <a href="faqcat38c2.html?sec=misc#faqavail">20.40</a>),or on the web at<a href="http://www.cyberdiem.com/vin/learn.html"><TT>http://www.cyberdiem.com/vin/learn.html</TT></a>.</p><p>See alsoquestions <a href="faqcatccbd.html?sec=resources#tutsources">18.9b</a>, <a href="faqcatccbd.html?sec=resources#books">18.10</a>, and <a href="faqcatccbd.html?sec=resources#miscsrcs">18.15c</a>.<hr><hr><hr><a name="tutsources"><h1>comp.lang.c FAQ list<font color=blue>&middot;</font><a href="../../resources/tutsources.html"><!-- qtag -->Question 18.9b</a></h1><p><font face=Helvetica size=8 color=blue><b>Q:</b></font>Where can I find some good code examples to study and learn from?</p><p><hr><p><font face=Helvetica size=8 color=blue><b>A:</b></font>Although studying existing source code is indeed a very good way of learning,it's unfortunately hard to recommend any truly good examples,because so much of the actual code out thereis either pedagogical (i.e. not real-world),or all too real-world(i.e. too voluminous and complicated for mere mortals to understand).</p><p>With that said, hereare acouple oflinks to explore:<UL><li><a href="ftp://garbo.uwasa.fi/pc/c-lang/"><TT>ftp://garbo.uwasa.fi/pc/c-lang/</TT></a>(and <a href="ftp://garbo.uwasa.fi/pc/c-lang/00index.txt">index</a>)<li><a href="http://www.eskimo.com/~scs/src/"><TT>http://www.eskimo.com/~scs/src/</TT></a></UL></p><p>A word of warning:there is some excellent code out there to learn from,but there is plenty oftruly bletcherous code,too.If you find yourself perusing some codewhich is scintillatingly clear andwhich accomplishes its task as easily as it ought to(if not more so),do learn everything you can from that code.But if you come across some code that is unmanageably confusing,that seems to be operating with ten bandaged thumbsand boxing gloves on,please do <em>not</em> imagine that that's the way it has to be;if nothing else,walk away from such code having learned only thatyou're not going to commit any such atrocities yourself.</p><p>See alsoquestions <a href="faqcatccbd.html?sec=resources#tutorials">18.9</a>, <a href="faqcatccbd.html?sec=resources#stdlibsrc">18.13</a>, <a href="faqcatccbd.html?sec=resources#miscsrcs">18.15c</a>, and <a href="faqcatccbd.html?sec=resources#sources">18.16</a>.<hr><hr><hr><a name="books"><h1>comp.lang.c FAQ list<font color=blue>&middot;</font><a href="../../resources/books.html"><!-- qtag -->Question 18.10</a></h1><p><font face=Helvetica size=8 color=blue><b>Q:</b></font>What's a good book for learning C?What about advanced books and references?</p><p><hr><p><font face=Helvetica size=8 color=blue><b>A:</b></font>There are far too manybooks on Cto list here;it's impossible to rate them all.Many people believe that the bestonewas also the first:<I>The C Programming Language</I>,byBrianKernighan andDennisRitchie(``K&amp;R,''now in its second edition).Opinions vary onK&amp;R's suitability as an initial programming text:many of us did learn C from it, and learned it well;some, however,feel that it is a bit too clinicalas afirsttutorial for thosewithout much programming background.Several sets of annotations and errata are available on the net,by<a href="http://www.csd.uwo.ca/~jamie/.Refs/.Footnotes/C-annotes.html">J. Blustein</a>,<a href="http://www.eskimo.com/~scs/cclass/krnotes/top.html">this FAQ list's author</a>,and<a href="http://cm.bell-labs.com/cm/cs/cbook/2ediffs.html">K&amp;R themselves</a>.</p><p>Many comp.lang.c regulars recommend<I>C: A Modern Approach</I>,by K.N. King.</p><p>An excellent reference manual is<I>C: A Reference Manual</I>,by Samuel P. Harbison and Guy L. Steele,now in its fourth edition.</p><p>Though not suitable for learning C from scratch,<a href="http://www.aw.com/cseng/authors/summit/cfaq/cfaq.html"><TT>this FAQ list</TT></a>has been published in<a href="http://www.aw.com/cseng/authors/summit/cfaq/cfaq.html"><TT>book form</TT></a>;see the Bibliography.</p><p>The<a href="http://www.accu.org/">Association of C and C++ Users</a>(ACCU)maintains a<a href="http://www.accu.org/bookreviews/public/index.htm">comprehensive set of bibliographic reviews of C/C++ titles</a>.</p><p>See also question <a href="faqcatccbd.html?sec=resources#tutorials">18.9</a>.</p><p>Additional links:<a href="../../resources/sd19.html" rel=subdocument>Ian Hay's recommended book list</a><hr><hr><hr><a name="kranswers"><h1>comp.lang.c FAQ list<font color=blue>&middot;</font><a href="../../resources/kranswers.html"><!-- qtag -->Question 18.11</a></h1><p><font face=Helvetica size=8 color=blue><b>Q:</b></font>Where can I find answers to the exercises inK&amp;R?</p><p><hr><p><font face=Helvetica size=8 color=blue><b>A:</b></font>They have been written up(a)by various nettersand collected by <a href="http://www.rjgh.co.uk/">Richard Heathfield</a>at <a href="http://users.powernet.co.uk/eton/kandr2/"><TT>http://users.powernet.co.uk/eton/kandr2/</TT></a>,and (b)in<I>The C Answer Book</I>;see the Bibliography.<hr><hr><hr><a name="booksrcs"><h1>comp.lang.c FAQ list<font color=blue>&middot;</font><a href="../../resources/booksrcs.html"><!-- qtag -->Question 18.12</a></h1><p><font face=Helvetica size=8 color=blue><b>Q:</b></font>Does anyone know where the source code frombookslike<I>Numerical Recipes in C</I>,Plauger's<I>The Standard C Library</I>,orKernighan andPike's<I>The UNIX Programming Environment</I>is available on-line?</p><p><hr><p><font face=Helvetica size=8 color=blue><b>A:</b></font>Books containing large quantitiesof potentially-useful source code,includingthe onesmentionedin the question,usuallymake explicit mention of the availability of source codeand policies for its use.Published source codeiscopyrighted,and may generally not be used,or especially redistributed,without permission(and perhaps a few restrictions,though presumably the publisher doesn't mindyourtyping it in for personal use).Often a diskette is available from the publisher;also,many publishershave set upftp sites and web pages.</p><p>Some of the routines from<I>Numerical Recipes</I>have been released to the public domain;see<a href="http://www.numerical-recipes.com/public-domain.html">the Numerical Recipes website</a>for details.<hr><hr><hr><a name="stdlibsrc"><h1>comp.lang.c FAQ list<font color=blue>&middot;</font><a href="../../resources/stdlibsrc.html"><!-- qtag -->Question 18.13</a></h1><p><font face=Helvetica size=8 color=blue><b>Q:</b></font>Where can I find the sources of the standard C libraries?</p><p><hr><p><font face=Helvetica size=8 color=blue><b>A:</b></font>The GNU project has a complete implementation at<a href="http://www.gnu.org/software/libc/"><TT>http://www.gnu.org/software/libc/</TT></a>.Another source(though not public domain)is<I>The Standard C Library</I>,by P.J. Plauger(see the Bibliography).See alsoquestions <a href="faqcatccbd.html?sec=resources#tutsources">18.9b</a>, <a href="faqcatccbd.html?sec=resources#miscsrcs">18.15c</a>, and <a href="faqcatccbd.html?sec=resources#sources">18.16</a>.<hr><hr><hr><a name="onlinecref"><h1>comp.lang.c FAQ list<font color=blue>&middot;</font><a href="../../resources/onlinecref.html"><!-- qtag -->Question 18.13b</a></h1><p><font face=Helvetica size=8 color=blue><b>Q:</b></font>Is there an on-line C reference manual?</p><p><hr><p><font face=Helvetica size=8 color=blue><b>A:</b></font>Two possibilities are<a href="http://www.cs.man.ac.uk/standard_c/_index.html"><TT>http://www.cs.man.ac.uk/standard_c/_index.html</TT></a>and<a href="http://www.dinkumware.com/htm_cl/index.html"><TT>http://www.dinkumware.com/htm_cl/index.html</TT></a>.<hr><hr><hr><a name="ansiavail"><h1>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -