I have a few remarks to your post:
1) For serial (or TCP/IP, GPIB, etc, even USB since VISA 3.1) communication of any kind it is almost never ever necessary to use CINs or other external code in LabVIEW. LabVIEW has all the bit manipulation tools on board you might possibly need. Your particular function you try to solve in your CIN is simply done for you by the LabVIEW function Boolean Array To Number in the Boolean function palette.
2) Creating CINs is highly discouraged nowadays. Creating DLLs instead and linking them into LabVIEW with the Call Library Node is not anymore difficult and in fact better supported by NI nowadays. It gives you much more choice of your development platform/IDE for the external code, usually is a more commonly known
target to create and has less LabVIEW specific difficulties to get started with and also to get it working. CINs are slowly fading away and the version of LabVIEW where support to create CINs will not anymore be available at least out of the box is probably not that far away (although I would advise NI to not remove runtime support of CINs for the next few years).
3) If you pass in an array to be worked on in the CIN you either must create a big enough array on the LabVIEW diagram with "Initialize Array" for instance or use functions like NumericArrayResize() in the C code to make sure the handle is large enough to access the [*count] element in the embedded pointer.
4) While it may seem not very clear what a handle is and how it works at first the declarations you get in your C code together with a good understanding of how C compilers work, are really all that is necessary to understand what happens. While there exist some LabVIEW manuals and tutorials to tell you some of the basics of these things, it can not be the intention to teach you every aspect of C in them. If you want to write DLLs (or CINs which is really not anymore different) you should understand those basics and if you don't, learn them from a book or course which is specifically meant to teach you about C programming concepts.
I have used a German book "C Programmieren, Ein Kurs zum Selbststudium mit Musterloesungen" by Guido Krueger from Addison-Wesley as well as "Teach Yourself C" by Herbert Schildt from Osborne McGraw-Hill mostly for the C programming part and use "C, A reference Manual" by Samual P. Harbison and Guy L.Steele Jr. from Prentice Hall regularly as a reference, if I need to look up things like operator precedence and ANSI C function semantics.
There are certainly other English books for a good introduction into C programming, which also explain more advanced techniques like pointers and all kind of pointer operations/arithmetic etc. Which book might be the best for you depends a lot on your style of learning. Some prefer reference manuals where they can easily lookup things when they arise, others prefer a paced step by step course to work through. I think that Addison-Wesley, Prentice Hall and McGraw-Hill have usually guite good and useful books about programming topics, which doesn't say that there are no others, but these are the ones I have regularly come across in the past when looking for programming books of all kinds.
Rolf Kalbermatter
Rolf Kalbermatter
My Blog 
DEMO, Electronic and Mechanical Support department, room 36.LB00.390