Good, you figured out how to use code tags. Very very bad, you did not indent your code! The purpose of code tags is to preserve your code's indentation, thus preserving its formatting, thus keeping it readable.
You also did not correct the declaration of main().
What is the current status of your program? Also, was I right that you had used a word processor instead of a text editor?
Further explanation of the problem which should clarify some of the error messages you were getting. Since you corrected the problem of the double quotes, I offer this short text from my reply as the example, since it contains a line of code from your original post which I had copied and pasted:
| Wait a minute here. |
That is not the same as
Here is the hex dump of that text (produced by xxd):
0000000: 5761 6974 2061 206d 696e 7574 6520 6865 Wait a minute he
0000010: 7265 2e0d 0a70 7269 6e74 6628 9331 2e49 re...printf(.1.I
0000020: 6e73 6572 745c 6e94 293b 0d0a 5468 6174 nsert\n.);..That
0000030: 2069 7320 6e6f 7420 7468 6520 7361 6d65 is not the same
0000040: 2061 730d 0a70 7269 6e74 6628 2231 2e49 as..printf("1.I
0000050: 6e73 6572 745c 6e22 293b 0d0a nsert\n");..
As you can see, the ASCII code for " is 0x22 (34 decimal). However, the ASCII codes for “ and ” are 0x93 and 0x94, respectively (147 and 148 decimal); BTW, only the first 128 codes (1-127) are standard, while ASCII codes 128-255 are "extended ASCII", of which that are several different decodings. Because of that, xxd only displays characters for 7-bit ASCII; all extended-ASCII codes are represented by a period. Note that neither “ nor ” is displayed, but rather they have been replaced by periods.
The error messages of interest are:
| green.c:21: parse error before character 0223 |
green.c:21: missing white space after number `1.'
green.c:21: stray '\' in program
which occur repeatedly. I chose the ones for the line that I just did a hex dump of.
0223 is an octal number which is equivalent to the hex value 0x93, or 147 decimal. Octal numbers (base 8) are indicated by a leading zero and use the 8 digits ranging from 0 to 7. Hexadecimal numbers (base 16) are indicated by the prefix, "0x", and use the 16 digits ranging from 0 to 9 and from A to F (representing 10 through 15). Both number bases are used extensively in computer science since conversion between them and binary is extremely simple.
So then, the first error says that it cannot figure out the “ since that is not a valid character in C syntax. It does not know that you intended that to start a string, so when it encounters the 1 it thinks it needs to start building a number, but then there's a letter immediately after it, which is contrary to C syntax. And then, still thinking that it's supposed to be scanning code, it encounters the \n, which is completely out of place in that "code".
But by replacing those invalid characters with proper double quotes (ASCII code 34), it correctly identifies what is code and what is a string.
And now you know the rest of the story.