Results 1 to 2 of 2

Thread: Looking for a C textbook with emphasis on data types

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2001

    Looking for a C textbook with emphasis on data types

    I am supposed to teach an introductory C course with an unusual slant, and have trouble finding an appropriate textbook. The course will begin traditionally enough with variables, loops, conditionals, structures, pointers and fopen/fclose. Beyond that, however, every course and textbook I had seen is heavy on data structures, and touches on other topics lightly if at all. Whereas I need to stress data types, converting them one into the other, and bit manipulation. By the end of the course I do not care if my students know what a linked list is, let alone a binary tree, but they must have good understanding of ASCII, binary and hexadecimal. For example, it must be clear to them why number 353 is actually stored as 0x01 0x61 if it's and INT, but 0x33 0x35 0x33 if it's a CHAR*. Or why converting a numeric CHAR into an INT involves subtracting 48 -- and not 30, as previous example might suggest.

    Is there a textbook with such emphasis on data types, bits, and hexadecimal, or am I doomed to writing my own?

  2. #2
    Join Date
    Nov 2002
    Ilya, I don't know of any C books that step away from C that far. It'd be a serious digression, and I would expect most editors to smack the author about the head and neck for going off track that far. Bit manipulation and ASCII are applications that C can certainly do (and do exceptionally well), but neither have anything to do with any specific programming language, let alone C.

    That's a bit like having a chapter on "right of way" in a Ford engine manual.

    You're probably going to need a book on programming techniques, or very low-level programming (assembly) to get much of anything on bitwise. That's the bad news.

    The good news is, bitwise operators and typecasting are actually very short subjects. The principles and operators can be described in only a few pages. The trick in understanding them is in practice using them, and knowing when and why. And that's not something that'll come through well in a manual. It's all context and decent assignments after that.
    "Words that make questions may not be questions at all."
    - Neil deGrasse Tyson, answering loaded question in ten words or less
    at a 2010 talk MCed by Stephen Colbert.

Similar Threads

  1. Optimizing Code - Data types
    By dgavin in forum Coder Talk
    Replies: 13
    Last Post: 2016-May-15, 10:12 PM
  2. Replies: 41
    Last Post: 2008-Jul-18, 04:07 PM
  3. Bad Textbook, sort of
    By Tobin Dax in forum Small Media at Large
    Replies: 8
    Last Post: 2007-Aug-21, 01:23 AM
  4. A textbook supernova: G11.2-0.3
    By Blob in forum Astronomy
    Replies: 0
    Last Post: 2007-Jan-30, 10:00 PM
  5. Textbook Explanation?
    By Tbutyl in forum Off-Topic Babbling
    Replies: 15
    Last Post: 2004-Nov-17, 05:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts