I wonder if it is good or bad (or does not matter) if I reuse the variable names as much as possible? for example
int main(void){
//...
int x=0;
//..
It is better to reuse variables in terms of memory. But be careful you don't need the value in a variable before reusing it. Other than that, you shouldn't use always the variable. It is important to keep a clean and readable code. So I advice you to choose different variable with names depending on the context so that your code don't become confusing.
You should also take a look at dynamic memory allocation in C, which is very useful to manage memory and variables.
https://en.wikipedia.org/wiki/C_dynamic_memory_allocation