C coding question

I am new to this and have a question that I might have missed the answer to.

i noticed that when writing a sketch that there are spaces between the lines of code, do they need too be there ?

The ‘white space’ in c-style languages is very flexible
there are very few ‘rules’, other than there has to be between keywords or structures. More or less is not a problem - unless they are enclosed “between quotation marks” - when they become part of a “literal” constant.

If you’re outputting whitespace from a print statement or similar there are ‘escape’ sequences to add these inline with text....

do they need too be there ?

Yes, and no. The compiler doesn't care, so, no they don't need to be there.

But, if you have problems with the code, donotexpecttogethelphereifyouhaveremovedallthewhitespace.

Think of it like prose - you don't need to write things in paragraphs and sentences, but it helps in your (human) understanding if they are.

A good piece of code should be a pleasure to read, like a good book.

i noticed that when writing a sketch that there are spaces between the lines of code,

What editor are you using that inserts blank lines between lines of code ?

The Tools->Auto Format menu item will help with adding some spaces where they are commonly used to make the code more readable. That is why we ask people to use Auto Format before posting their sketch.