I've never seen the Beginning C for Arduino book but I like the idea!
Much of Standard* C/C++ won't run on the Arduino... The basic syntax & structure are the same but the details are different. For example, the first program you learn in almost any programming language is "Hello World!" (which simply displays "Hello World!" on the screen). Of course, the Arduino doesn't come with a screen. C/C++ also expects a keyboard and disk storage. With the Arduino the "Blink LED" example is equivalent to "Hello World!"
I'm having issues with understanding when punctuation is used and how.
A book should help, as will practice. Every programming language is different and the compiler is "picky". You'll learn a lot by making mistakes!
A misspelling will cause an error, a missing semicolon or missing/misplaced curly bracket will cause an error. And, it's easy to confuse the compiler and it can give you misleading information. I had a misplaced curly bracket once and the compiler reported hundreds of errors...
When I was learning C & C++ (from books) I typed-in all of the example programs by hand so that I had to pay attention to the details.
When writing your own programs start with a "shell" or something like the Blink LED example, then write one or two lines at at time, test-compiling and test-running as you go. This is a little tricky and it takes some practice because the compiler has to see a "complete program". For example, if you delete the last half of a program, you will get errors when you compile. Of course, professional programmers write more than one or two lines at a time, but they are usually working on larger programs and nobody writes the whole program before trying it.
And, it's very helpful to send variable-values or other messages out to the Serial Monitor so you can "see" what your program is doing , and if it's working so-far, before it's done.
There are two types of bugs/errors - Syntax errors will be reported by the compiler. Logical errors won't be caught by the compiler but the program won't do what you expect.
I've never programmed anything before.
Although many Arduino programs are "easy", and the Arduino is a good-easy way to learn, in general, programming is difficult! Not everybody is good at it, and it's "different" from any other subject/discipline. Professional programmers make mistakes every day... In any other profession you'd be fired for making so many mistakes!
The two most important concepts in programming are conditional execution (if statements, etc.) and loops (doing something over-and-over, usually until some condition is reached).
- There are ANSI/ISO C and C++ language standards.