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;
//..
int x=0;
//..
x = atoi(char_var);
//..
int x = 0;
You cannot redeclare x
in the same scope. If you are not redeclaring it but using it for different purposes, you are free to do this. But it's a bad practice and should be avoided as it decreases code readability. Also you should find meaningful names for your variables for the same reasons.