LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 12-05-2001, 08:49 AM   #1
rajaram
LQ Newbie
 
Registered: Nov 2001
Posts: 6

Rep: Reputation: 0
ANSI C Manual


I am using redhat linux version 7.1

Is it possible to write programs completely based on ANSI C. Where can i get the ANSI C manual?

Thanks,
Rajaram.
 
Old 12-08-2001, 06:16 AM   #2
gui10
Member
 
Registered: Mar 2001
Distribution: enigma, slack8
Posts: 677

Rep: Reputation: 30
i believe u can use the gcc compiler that should have come with your default installation... that should be ANSI C compliant...

i am not sure where to get the ANSI C manual though...

i'm sure someone who knows will come along soon enough...
 
Old 12-10-2001, 01:29 PM   #3
pinoy
LQ Newbie
 
Registered: Sep 2001
Posts: 21

Rep: Reputation: 15
There is an option in gcc to compile ANSI C only (I think it's --ansi, consult the man pages). You can also use --pedantic.

As for the ANSI C reference, you'll have to buy it from the ANSI standards, consult the comp.lang.c FAQ, I'm sure they have an address for ANSI and how to get the standard. If you just want the ANSI C library reference, there is a book by PJ Plauger named The Standard C Library, it has a complete implementation of the C library plus the standard text. It is a very dry read however, and should only be used as a reference.
 
Old 12-16-2001, 03:29 PM   #4
ferrous
LQ Newbie
 
Registered: Dec 2001
Location: Atlanta
Distribution: Slackware
Posts: 16

Rep: Reputation: 0
I'm pretty sure that you don't want the ANSI C standards, though. It's a good reference if you want to build a C compiler, not as useful if you want to write a program in the language.

I imagine you want an authoratative text from which to learn C, like the Visual Basic programmers manual. It's just my guess, given the inherent newbieality of your post.

In that case, I'd recommend Kernighan & Ritchie's
The C Programming Language, but there are plenty of other books that can be used to learn the language. C isn't as authoritarian as VB, and very few books are going to outright lie about anything.

That being said, I recommend against the O'Reilly book "Practical C Programming" or whatever its called. O'Reilly and Co. put out some good material, but every once in a while they screw up. Also, please don't get anything by a man named Herbert Schildt. He mainly writes C++ books badly, but he's been known to write books on C badly as well.

And don't worry about the mysterious K&R C and how its incompatible with ANSI C. You'd have to go digging to find a book that doesn't focus on the ANSI version. Even Kernighan and Ritchie's book only mentions the older, more cumbersome style.

Also, someone mentioned the reference book on the ANSI library. They're right. It's a very dry read, and probably won't be too helpful. You've got Redhat: you've got the manpages. Type

man man

at your prompt for more information. Try

man 3 printf

and

man 2 malloc

after that.
 
Old 12-23-2001, 09:33 AM   #5
RussellJohnston
LQ Newbie
 
Registered: Dec 2001
Posts: 1

Rep: Reputation: 0
Harbison & Steele

Harbison & Steele, C: A Reference Manual, 4th ed., 1995, Prentice-Hall.

"Our aim is to provide a complete discussion of the language, the run-time libraries, and a style of C programming that emphasizes correctness, portability, and maintainability."

Includes information on Standard C vs. "traditional" C, (which can be helpful if you ever maintain or study old code) and on C++ compatability issues. Reference as opposed to tutorial, but includes many examples giving advice and pointing out pitfalls. Very clear writing and organization. This book is a thing of beauty!
 
Old 12-23-2001, 11:00 AM   #6
ericn
Member
 
Registered: Oct 2001
Distribution: Mandrake 8.2
Posts: 44

Rep: Reputation: 15
I have found

Sams-Teach Yourself C for Linux Programming in 21 days, a good way to start and
C Programming -A Modern Approach by KN King as a good follow up to delve into the concepts a little more thoroughly.

btw-Pointers are a pain

late
eric
 
Old 01-05-2002, 07:39 PM   #7
tyler_durden
Member
 
Registered: May 2001
Posts: 125

Rep: Reputation: 15
if you are just looking for a basic c tutorial i recommend my favorite c tutorial cite here
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ansi Telnet thebutler4 Linux - Software 1 05-25-2004 12:58 PM
uninstalling ANSI C jogurt666 Debian 3 02-09-2004 09:10 AM
Is this ansi-c compliant? xailer Programming 5 12-26-2003 08:49 PM
"ANSI C free manual for programming referance bill icse Programming 0 08-04-2003 11:18 AM
images to ansi jayakrishnan Linux - General 1 06-06-2002 10:20 AM


All times are GMT -5. The time now is 05:09 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration