1
edit
Changes
m
<li>Declare only one variable per data type. It is easier to comment a variable this way.</li>
<code>
Eg. correct int i; //To count the number of times in for-loop
int j;
int k; //To count another variable
Eg. wrong int i,j,k; //How do I separately comment
int i; int j; int k; //the variables here?
</code>
→Coding Style
<li>Class names must begin with a capital letter</li>
<li>Declare each variable in a line by itself. It is easier to comment a variable this way. Do not use commas to separate the variable names if they have the same data type.</li>
<code>
Eg. correct int i; //To count the number of times in for-loop
int j;
int k; //To count another variable
Eg. wrong int i,j,k; //How do I separately comment
int i; int j; int k; //the variables here?
</code>
<li>Type four (4) spaces over for every block of code. (This is as opposed to tabbing.) For example: </li>
<li>Only <code>main ()</code> will start at column 1. Tab every block of code four spaces over.</li>
<li>Include an empty line after the declaration of variables (see above example).</li>