int main(void) {
...
char A[32] = "00000000000000001111111111111110";
...
A = "11111111111111111111111111111111";
}
This is erroneous c-code for what I want to do. I want the string in memory to be overwritten with a new string of the same length. I keep getting incompatible types -like errors.
Use strncpy:
char chararray[6];
(void)strncpy(chararray, "abcdefgh", sizeof(chararray));