In the code which I have pasted below, after I copy the contents of split data i,e "he", "ll" and "oo" to new data array (which is 2d array) . I am freeing the StringSplit[i]. But after freeing, i am not able to see the data which i copied to 2d array newData also. what is happening in this code and how do i ensure the data in varible "newData" is saved. and newData is global variable
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char *data= "Helloo";
StringOperations(data);
return 0;
}