Serial Echo code breakdown [beginner]

The expression:

void process_data (const char * data)

is what is called a function signature and is used by the compiler to identify a function. (If it had a semicolon at the end of the line, it would be called a function prototype.) The word void is called the function type specifier. Every function has the ability to return a value to whatever invoked that function. The word void for this type specifier simply means that this function does not return a value.

Next, process_date is simply the name of the function.

Next, the const keyword means that whatever follows is to be etched in stone and cannot be changed. When used in parentheses following a function name, it means that the data item passed into this function cannot be changed by the function.

Next, the char * data is the actual data being passed into the function. Using Purdum's RIght-Left Rule, you can verbalize this data item as: "data is a pointer to char". Pointers are often difficult for new programmers to understand, but worth knowing. A valid pointer can have only two possible values: 1) the memory address of a data type, or 2) null (binary 0, or '\0'). What we are saying here is that, if it is a valid, non-null pointer, it points to a memory address where a character named data lives.

Hope that helps.