3 ms·
C does not in anyway forbid having two definitions on the same line hence char var2, *var1; is valid C while in Java this would be illegal char var2,
by pawadu 10y ago
C does not in anyway forbid having two definitions on the same line hence
char var2, *var1;
is valid C while in Java this would be illegal
char var2, [] var1;
So the syntax is correct and all you are doing is to add style rules that make it less readable.
- shakna 10y agoHaving one var per line, with left bound typing seems more readable to me. That said, I understand the differences in traditions. I think that C's syntax is flexible that we can each go to our own, and decide which is more readable.