title: Allocating memory to char* C language
body: <p>Is it the correct way of allocating memory to a char*.</p>
  
  <pre><code>char* sides ="5";
  
  char* tempSides;
  
  tempSides = (char*)malloc(strlen(inSides) * sizeof(char));
  </code></pre>