So I have seen that some people do not recommend using String literals to create a char in C. However, I have found this to be the most useful method and I have a char set as
char a[] = "456";
I understand that the memory is fixed in this data type. However, in my assignment I believe that I need to be able to reallocate memory for my char value since I am adding integers that are represented as strings. For example:
char b[] = "500";
char c[] = "501";
//add function for adding b and c. have a char d[] equal to "1000".
I am using long addition to accomplish this. I have tried experimenting with the realloc function but it did not work. How would I continuously append new characters onto a string?