Reversing an inputted sentence I sometimes hear people say how they can distinguish between good and bad coders of a certain programming language or even programming in general simply by looking at the code they write.

I'm relearning C, and I was just wondering whether my program follows best practices in terms of my commenting, the way I set it up, and generally the way I've incorporated the for and while loops along with macros (whether it be better to use a goto statement here, or a while loop instead of a for loop there, etc).

#include &lt;stdio.h&gt;


#define SIZE (sizeof(words[0])/sizeof(words[0][1]))
#define ROWS 10
#define COLUMNS 20


int main()
{
//The maxmimum letters in a words is 20 and the max words is 10
char words[ROWS][COLUMNS]={0},character;
int count_1=0,count_2=0,i,j;

printf("Enter something:  ");
character=getch();
putch(character);
while(character!='\r')
{
words[count_1][count_2]=character;
//Allows the next index to contain the value of the next inputted character
count_2++;
if(character==' ')
{
//index of inputted characters reset to 0
count_2=0;
//Allows the next row in array to be changed as one row will already satisfy a word
count_1++;
}

character=getch();
putch(character);
}

printf("\n");
//Starts from the last word
for(i=count_1;i&gt;=0;i--)
{
for(j=0;j&lt;SIZE;j++)
{
if(words[i][j]!=0)
printf("%c",words[i][j]);
}
}
}


I know the next bit is a bit opinionated, but does my code give an idea of where I'm at with logic and programming as a whole, or is the first part just some kind of myth (i.e. you can't judge a person by such a small piece of code)?

Note: I deliberately avoided the use of functions and strings. I got this task from C Programming: A Modern Approach, and I'm only attempting to solve a programming task simply by using only the features I've learned thus far in the book.
I sometimes hear people say how they can distinguish between good and bad coders of a certain programming language or even programming in general simply by looking at the code they write.


I think that's true, to some extent. How else (except by the code they write) would you judge a programmer's ability?

Distinguishing programmers from their code is just the beginning though: see this answer for example.

Professional-level programming might also be categorized e.g. with Programmer Competency Matrix


  I was just wondering whether my program follows best practices


Not all the best practices; it could still be improved, for example:


Avoid macros (#define)
Format it well (use indentation)
Give good user output (better than "Enter something:  ")
Use subroutines (don't put everything in main)
Don't overflow your input buffer (e.g. if the end-user enters more than 10 words, or words more than 20 characters long)
Use library methods appropriately (e.g. not printf("%c" when you want to output a whole string and not just one character)
Use good identifier names (e.g. I'd prefer row and col, or x and y, or imax and jmax, instead of count_1 and count_2)
Be flexible in handling input correctly (e.g. I'd prefer arbitrary-length words and arbitrary-many words, which would require you to use a heap-based list or array of variable/infinite-length strings, instead of a fixed-size array)



  I know the next bit is a bit opinionated, but does my code give an idea of where I'm at with logic and programming as a whole


I think so. The code matches where you said you're at, which is that you are "relearning C".

Working a 40-hour week makes about 2000 hours per year.

So an adult professional programmer will have spent many 1000s of hours of practice and studying.