title: concatenating using C function to large char*
body: <p>I am trying to concatenate char* and const string but the system hangs. following is the code</p>
  
  <pre><code>unsigned long long size = 2*pow(10,18);
  char* string = malloc(size);    
  strcat(string," ");
  </code></pre>
  
  <p>I am not sure how to resolve the error. Using Dev c/c++ in windows 10. </p>
  
  <p>Edit: Thank you for all your comments and answer. I have made the change in my code. But it still gives the same problem.
  It does not print the statement and still hangs.</p>
  
  <pre><code>char* string = malloc(20*sizeof(char));
  if(string=NULL){
      printf("unsuccessful memory allocation");
  }
  
  strcat(string," ");
  </code></pre>