#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char* aa = "hello world";
char* bb = (char*)malloc(strlen(aa)+1);
char* ta = aa;
char* tb = bb;
while(*bb++ = *aa++){
;
}
bb = tb;
printf("%s\n",bb);
return 0;
}
console log:
hello world