Sponsored Content
Full Discussion: Good book to learn C
Top Forums Programming Good book to learn C Post 302534037 by alister on Sunday 26th of June 2011 05:34:44 PM
Old 06-26-2011
I second agama's opinion. Kernighan and Ritchie's The C Programming Language is a fine way to start. I learned C from the yellowing 2nd edition copy that I have right here.

From the back cover: "C is not a big language, and it is not well served by a big book." The main section of the book is only 189 pages (followed by reference material). Compared to 1000+ page programming tomes common today, this is remarkably brief.

This book will give you a solid understanding of the ANSI C language (C89 to be precise) and its standard library. Nothing more. It does not deal with kernel system call interfaces, compiler/toolchain instructions, etc, which is a good thing in my opinion. Because it concentrates on C, it has aged quite well.

The book uses a very clear writing style, so you should be able to digest the dense areas agama mentioned. Working through the provided exercises will help you here.

If you do decide to use K&R, make sure it's the 2nd Edition; using someone's 1st edition will teach you an older, pre-ANSI dialect that you'll only encounter in geriatric code (no offense, old timers Smilie).

Whichever book you choose, once you've finished it and have spent some time hacking with C, you may want to peruse comp.lang.c Frequently Asked Questions and see how well you do with their questions. It'll help reinforce what you've learned and will probably teach you quite a few things regarding commonplace mistakes and unfounded assumptions.

Regards and good luck,
Alister
 

10 More Discussions You Might Find Interesting

1. Linux

Looking for a good book to learn LINUX

I have just transferred from an mainframe DB2 area to an area that uses LINUX. Any suggestions for a good book to buy for learning LINUX? (1 Reply)
Discussion started by: bigdawg
1 Replies

2. Programming

book to learn pro c\c++

can any one help me and told me about a good books to learn 1- pro c/c++ under unix 2- programming network using c under unix thnx in advance. (1 Reply)
Discussion started by: kazanoova2
1 Replies

3. Shell Programming and Scripting

Any book to learn perl scripting

Hi, Please suggest me any good book to learn pearl scripting. Thanks in advance !!!!:) (5 Replies)
Discussion started by: vkvishwakarma6
5 Replies

4. UNIX for Dummies Questions & Answers

Recommended book to learn about unix administration?

My knowledge is weak in understanding NIS servers, setting up user accounts, mounting network file systems, clearing stale NFS handles, those sorts of things that I encounter but my IT server team handles. Can anyone recommend a good book on the subject? Something to demystify mount points,... (1 Reply)
Discussion started by: srhadden
1 Replies

5. UNIX for Dummies Questions & Answers

good book to learn korn shell scripting

which is a gud book to learn advanced korn shell scripting? i know the basic shell scripting (1 Reply)
Discussion started by: shishirkotkar
1 Replies

6. UNIX for Dummies Questions & Answers

Best book to learn UNIX from the begining

What is the Best book to learn UNIX from the begining? am really a beginner and no nothing about UNIX, so what are the track that i have to trace in order to be a professional in UNIX and scripting? What are the best books to learn it and what are the certificates such as CCNA in networks... (5 Replies)
Discussion started by: eng.pirlo
5 Replies

7. UNIX for Dummies Questions & Answers

What is the best book to learn linux kernel?

I'm looking for a book to learn Linux Kernel Now I got a basic C and operating system concept Thanks (1 Reply)
Discussion started by: Runicer
1 Replies

8. What is on Your Mind?

Book to learn Perl

Hi guys, which book are you raccomand to start learn Perl from the ground ? (1 Reply)
Discussion started by: solaris_user
1 Replies

9. Programming

Can u tell me an good e-book to learn "C"

Actually I know bit of C++ and Java & C# for a extend. But when I have tried to go through some online exams of C++, I have found out that there's a lot for me to learn in C++ also. And as I Believe, most of the things are the once that C++, got from C. Actually I'm good with those OOP concepts... (3 Replies)
Discussion started by: Nohim Ys
3 Replies

10. Shell Programming and Scripting

Need a good book to learn UNIX Shell Scripting

I'm going to be starting a job in a month or so that I need to brush up on my Unix shell scripting skills. About 15 years ago, I took a college class for Unix shell scripting. I would like to find a good college book again, rather than just going to Amazon and just buying anything. This is... (2 Replies)
Discussion started by: dorlow
2 Replies
C(7)						       BSD Miscellaneous Information Manual						      C(7)

NAME
c, c78, c89, c90, c99 -- The C programming language DESCRIPTION
C is a general purpose programming language, which has a strong connection with the UNIX operating system and its derivatives, since the vast majority of those systems were written in the C language. The C language contains some basic ideas from the BCPL language through the B lan- guage written by Ken Thompson in 1970 for the DEC PDP-7 machines. The development of the UNIX operating system was started on a PDP-7 machine in assembly language, but it made very difficult to port the existing code to other systems. In 1972 Dennis M. Ritchie worked out the C programming language for further development of the UNIX operating system. The idea was to imple- ment only the C compiler for different platforms, and implement most part of the operating system in the new programming language to simplify the portability between different architectures. It follows that C is very eligible for (but not limited to) writing operating systems and low-level applications. The C language did not have a specification or standardized version for a long time. It went through a lot of changes and improvements for ages. In 1978, Brian W. Kernighan and Dennis M. Ritchie published the first book about C under the title "The C Programming Language". We can think of this book as the first specification of the language. This version is often referred as K&R C after the names of the authors. Sometimes it is referred as C78, as well, after the publishing year of the first edition of the book. It is important to notice, that the instruction set of the language is limited to the most fundamental elements for simplicity. Handling of the standard I/O and such common functions are implemented in the libraries shipped with the compiler. As these functions are also widely used, it was demanded to include into the description what requisites the library should conform to, not just strictly the language itself. Accordingly, the aforementioned standards cover the library elements, as well. The elements of this standard library is still not enough for more complicated tasks. In this case the provided system calls of the given operating system can be used. To not lose the portability by using these system calls, the POSIX (Portable Operating System Interface) standard evolved. It describes what functions should be available to keep portability. Note, that POSIX is not a C standard, but an operating system standard and thus is beyond the scope of this manual. The standards discussed below are all C standards and only cover the C programming language and the accompanying library. After the publication of the book mentioned before, the American National Standards Institute (ANSI) started to work on standardizing the language, and they announced ANSI X3.159-1989 in 1989. It is usually referred as ANSI C or C89. The main difference in this standard were the function prototypes, which is a new way of declaring functions. With the old-style function declarations, the compiler was unable to check the sanity of the actual parameters at a function call. The old syntax was highly error-prone because incompatible parameters were hard to detect in the program code and the problem only showed up at run-time. In 1990, the International Organization for Standardization (ISO) adopted the ANSI standard as ISO/IEC 9899:1990 in 1990. This is also referred as ISO C or C90. It only contains negligible minor modifications against ANSI C, so the two standards often considered to be fully equivalent. This was a very important milestone in the history of the C language, but the development of the language did not stop. The ISO C standard was later extended with an amendment as ISO/IEC 9899 AM1 in 1995. This contained, for example, the wide-character support in wchar.h and wctype.h. Two corrigenda were also published: Technical Corrigendum 1 as ISO/IEC 9899 TCOR1 in 1995 and Technical Corrigendum 2 as ISO/IEC 9899 TCOR1 in 1996. The continuous development and growth made it necessary to work out a new standard, which contains the new features and fixes the known defects and deficiencies of the language. As a result, ISO/IEC 9899:1999 was born in 1999. Similarly to the other standards, this is referred after the publication year as C99. The improvements include the following: o Inline functions o Support for variable length arrays o New high-precision integer type named long long int, and other integer types defined in stdint.h o New boolean data type implemented in stdbool.h o One line comments taken from the C++ language o Some new preprocessor features o New variables can be declared anywhere, not just in the beginning of the program or program blocks o No implicit int type Since then new standards have not been published, but the C language is still evolving. New and useful features have been showed up in the most famous C compiler: GNU C. Most of the UNIX-like operating systems use GNU C as a system compiler, but those addition in GNU C should not be considered as standard features. SEE ALSO
c89(1), c99(1), cc(1) STANDARDS
ANSI, X3.159-1989. ISO/IEC, 9899:1990, Programming languages -- C. ISO/IEC, 9899 AM1. ISO/IEC, 9899 TCOR1, Programming languages -- C, Technical Corrigendum 1. ISO/IEC, 9899 TCOR2, Programming languages -- C, Technical Corrigendum 2. ISO/IEC, 9899:1999, Programming languages -- C. HISTORY
This manual page first appeared in FreeBSD 9.0. AUTHORS
This manual page was originally written by Gabor Kovesdan <gabor@FreeBSD.org>. BSD
May 30, 2011 BSD
All times are GMT -4. The time now is 05:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy