← Back to topics
Topic

Global variable problem

n
nullzero
Is global variable initialized to zero.

Here is my code and It's wrong.

char A[100];
int main(){
strcat(A,"123");
...
return 0;
}


But when I use strcpy instead of strcat , It's correct.