How to append '=' to a string
问题 I am trying to add = at the end of my array and then end it by appending a 0 This is how I allocate my space char* postExpr = malloc(sizeof(char)*MAX_LEN); I have tried many methods but I am still failing to append character '=' at the end of my string, every other character works just fine. What have I tried postExpr[postLen++] = 61; postExpr[postLen++] = '='; postExpr[postLen++] = infExpr[i]; in infExpr[i] is stored the value '=' EDIT: char* infix2postfix (const char* infExpr) { char*