Skip to main content
Code Review

Return to Answer

replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

Apart from the other answer , i would suggest

int i;
int high = 0;
int k;
int j = 9;
int store;

instead of single line declarations.

int i, high = 0, k, j = 9, store;

The former way , may take more space , but is convenient for adding a comment to each declaration and for improves readability for subsequent modifications.

Also this answer this answer , makes a valid reason not to prefer single line declarations.

One more point is that , generally in most code i have seen , functions are declared before main() and defined after main().

So your program must look like,

void selection_sort(int [], int []); //Declaration
int main()
{
 
retrun 0;
}
 
void selection_sort(int num[], int sorted[]) //Definition
{
 
}

Apart from the other answer , i would suggest

int i;
int high = 0;
int k;
int j = 9;
int store;

instead of single line declarations.

int i, high = 0, k, j = 9, store;

The former way , may take more space , but is convenient for adding a comment to each declaration and for improves readability for subsequent modifications.

Also this answer , makes a valid reason not to prefer single line declarations.

One more point is that , generally in most code i have seen , functions are declared before main() and defined after main().

So your program must look like,

void selection_sort(int [], int []); //Declaration
int main()
{
 
retrun 0;
}
 
void selection_sort(int num[], int sorted[]) //Definition
{
 
}

Apart from the other answer , i would suggest

int i;
int high = 0;
int k;
int j = 9;
int store;

instead of single line declarations.

int i, high = 0, k, j = 9, store;

The former way , may take more space , but is convenient for adding a comment to each declaration and for improves readability for subsequent modifications.

Also this answer , makes a valid reason not to prefer single line declarations.

One more point is that , generally in most code i have seen , functions are declared before main() and defined after main().

So your program must look like,

void selection_sort(int [], int []); //Declaration
int main()
{
 
retrun 0;
}
 
void selection_sort(int num[], int sorted[]) //Definition
{
 
}
added 403 characters in body
Source Link

Apart from the other answer , i would suggest

int i;
int high = 0;
int k;
int j = 9;
int store;

instead of single line declarations.

int i, high = 0, k, j = 9, store;

The latterformer way , may take more space , but is convenient for adding a comment to each declaration and for improves readability for subsequent modifications.

Also this answer , makes a valid reason not to prefer single line declarations;declarations.

One more point is that , generally in most code i have seen , functions are declared before main() and defined after main().

So your program must look like,

void selection_sort(int [], int []); //Declaration
int main()
{
 
retrun 0;
}
 
void selection_sort(int num[], int sorted[]) //Definition
{
 
}

Apart from the other answer , i would suggest

int i;
int high = 0;
int k;
int j = 9;
int store;

instead of single line declarations.

int i, high = 0, k, j = 9, store;

The latter way , may take more space , but is convenient for adding a comment to each declaration and for improves readability for subsequent modifications.

Also this answer , makes a valid reason not to prefer single line declarations;

Apart from the other answer , i would suggest

int i;
int high = 0;
int k;
int j = 9;
int store;

instead of single line declarations.

int i, high = 0, k, j = 9, store;

The former way , may take more space , but is convenient for adding a comment to each declaration and for improves readability for subsequent modifications.

Also this answer , makes a valid reason not to prefer single line declarations.

One more point is that , generally in most code i have seen , functions are declared before main() and defined after main().

So your program must look like,

void selection_sort(int [], int []); //Declaration
int main()
{
 
retrun 0;
}
 
void selection_sort(int num[], int sorted[]) //Definition
{
 
}
Source Link

Apart from the other answer , i would suggest

int i;
int high = 0;
int k;
int j = 9;
int store;

instead of single line declarations.

int i, high = 0, k, j = 9, store;

The latter way , may take more space , but is convenient for adding a comment to each declaration and for improves readability for subsequent modifications.

Also this answer , makes a valid reason not to prefer single line declarations;

lang-c

AltStyle によって変換されたページ (->オリジナル) /