As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is there any compilation of C terminology available on net ? I feel it many times difficult to explain in exact technical terms what I wish to say.
Here is a compilation:
C Terminology
C Reference
Basic C
cdecl
cprogramming
CLC-wiki<---got from anon ymous to add
A to Z(C++ but there are helpful common terms)
A to Z(C/C++/C#)
wiki-book
Big tutorial
Tips and Tricks
There really is no substitute for the C Language Standard. The real deal from ISO is pretty expensive, but you can see a late draft at
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
The rationale can also be helpful.
http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf
Half compiled terminology are available at
CLC: terms
Programming Examples
and the best at 3. Terms, definitions, and symbols of C standard.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
This just seems odd to me, most other things are lower case.
Is there some historical reason?
It's a macro. Macros have historically had all caps in C. Unfortunately recent trends appear to have broken that fact.
Small history lesson: Also, FILE was an io buffer abstraction in UNIX v7 libc stdio. A FILE doesn't necessarily represent a physical file, just something that can do block IO. Source:
http://www.bsdlover.cn/study/UnixTree/V7/usr/include/stdio.h.html
"file" was already defined by the kernel as well:
http://www.bsdlover.cn/study/UnixTree/V7/usr/include/sys/file.h.html
As someone else said here it's probably a typedef now, but I don't think C had typedefs back in '79 as it only just had structs. Then again I wasn't born then so... :)
It's all caps almost certainly because at least originally it was a macro. Nowadays, chances are pretty good that it's a typedef instead, but nobody changed the name to boot (and doing so would be a pretty lousy idea).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I know it sounds kind of subjective, but I want to implement basic library functions in C in order to gain better understanding in C (mostly in pointers) and improve my skills, since I'm only a beginner (in C & programming in general).
I also find it useful since you get to understand better what happens behind the scenes and how those basic functions work.
Which basic C library functions can I implement? I'm looking for simple ones like strcpy, atoi, strstr that are not too complicated (I'm only a beginner) but still require some thinking.
Strings function are always challanging (and required). Try split a string to tokens, join strings, replace string in strings. Believe me, after that not only you will be a better C programmer, you will also appreciate open source libraries! (and C++ STL..)
Good luck!
After having implemented strtok(), you may want to switch to next level with qsort() and its function pointer.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I relearning C; it's been years and whilst familiar the nuances are lost in time.
I originally learned C from K&R. However, I now see many people levelling criticism at K&R.
A chief example is http://c.learncodethehardway.org/book/learn-c-the-hard-waych55.html#x61-27200055
Top reasons seem to be that it's code style is overly terse, practises aren't applicable in larger programs and lead to memory leaks or are subject to attack in shared network accessible systems.
Do people feel these criticisms are fair? Do they matter to somebody learning C? If so, could people recommend a "modern" C book, preferably available for Kindle?
As long as you're talking about the 2nd Edition, K&R is still very relevant.
In fact, I would say it's still the very best single book on C, both for learning, and for reference.
That said, you should also get a copy of Harbison & Steele's "C: A Reference Manual". It's the best current reference on C, and the Fifth Edition covers C99, which you should use if you can.
Also, once you've got a bit of C behind you, I'd strongly recommend reading "Expert C Programming", by Peter van der Linden.
It is still relevant and still very useful with regards to learning the language. Learning the language doesn't require you to implement new practices or styles that assist in code readability, etc.
For example, the idea of self documenting code is that you use verbose variable and function names to help explain the purpose of a function or a variable. K&R is clearly opposed to this. That doesn't mean you can't learn the C language from K&R, it just means that your style will need to be adjusted/updated based on whatever naming convention you decide upon in the future.
I cannot recommend "Expert C Programming" enough (as stated by gregj).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
This just seems odd to me, most other things are lower case.
Is there some historical reason?
It's a macro. Macros have historically had all caps in C. Unfortunately recent trends appear to have broken that fact.
Small history lesson: Also, FILE was an io buffer abstraction in UNIX v7 libc stdio. A FILE doesn't necessarily represent a physical file, just something that can do block IO. Source:
http://www.bsdlover.cn/study/UnixTree/V7/usr/include/stdio.h.html
"file" was already defined by the kernel as well:
http://www.bsdlover.cn/study/UnixTree/V7/usr/include/sys/file.h.html
As someone else said here it's probably a typedef now, but I don't think C had typedefs back in '79 as it only just had structs. Then again I wasn't born then so... :)
It's all caps almost certainly because at least originally it was a macro. Nowadays, chances are pretty good that it's a typedef instead, but nobody changed the name to boot (and doing so would be a pretty lousy idea).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
The C language requires that all variables used in the program should be declared before any other statements.
Why was this of significance? Was it for readability? If it was for readability, then why don't other languages follow the same rule?
I personally prefer declaring all my variables at the very start.
Moderators: Please delete if this is off-topic or already been asked. I was just keen to know improve my knowledge. Thanks.
Like other people said in comments now it's not mandatory anymore. Anyway it wasn't for readability. C is a very old language and one of its peculiar features is that a C file can be compiled with just one parsing. I think that the earliest version of the language made the choice to declare variable at the beginning for simplify the parsing