Hi, I have seen that some of the example programs availbale in this site define/declare variables as unsigned. For eg: unsigned voltage; //A-to-D example program What type would voltage in the above case assume? If it just holds a numeric value between 0 and 255 can I directly say float f = voltage/4.5; or do I need to do any casting on this statement. Thanks in advance
"I have a book titled 'C and the 8051' by Tom Schultz" As Erik often notes, such books are usually aimed at 'C' programmers who want to apply that skill to the 8051. Therefore, in addition to that book, you also need a book on the 'C' language itself. K&R is, of course, the standard work! http://www.amazon.co.uk/exec/obidos/ASIN/0131103628/qid=1149618505/sr=1-1/ref=sr_1_3_1/026-0034114-8808423
K&R is, of course, the standard work! but, in my opinion not good for a novice. For a starter, I much prefer Kochan "programming in ANSI C". With that book you can teach yourself C Erik
"in my opinion [K&R is] not good for a novice" I wouldn't disagree with that. But, for a concise reference, no 'C' programmer should be without one!
K&R is widely regarded as being a tutorial. H&S is widely regarded as being the reference.
K&R is widely regarded as being a tutorial. H&S is widely regarded as being the reference. That's funny. I always thought K&R was the ultimate reference (aside from the C standard itself), and everything else was aimed at helping folks come up to speed on C till they could understand (and appreciate) K&R. I've often heard K&R referred to as "The C Bible". That being said, I'm not familiar with H&S. Can you provide a link to it?
"That's funny. I always thought ..." The folks that write the standard, write the compilers, write the libraries, write the books, etc. generally agree with the K&R and H&S attributes as I have stated them. They're the folks who provided this general consensus in the first place. You can read about their feelings in comp.lang.c and comp.std.c. Anyhow, your link is: http://careferencemanual.com/