Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Why is the comma between A, B and C in the fourth line wrong instead of the semicolon?
Why is the comma between A, B and C in the fourth line wrong instead of the semicolon?
Comma means separator, and semicolon means the end of the statement.

For example, int a;; ; Represents the statement "plastic variable a";

int a,b,c; There are three integer variables a, b and C.

But int a,; b; c; The computer will look at the first sentence like this: there is an integer variable A. The second sentence B. The third sentence C. "

Because B and C appear separately, the computer can't recognize what they are, so the computer has an error.

Then you can write it like this

int a;

int b;

int

Or int a;; ; int b; int c;

Then the computer can recognize it.

You just need to remember that commas are the separators of variables, and semicolons indicate the end of statements.