title: How to store result of type char in pointer?
body: <p>I want to store result of type char in pointer which I'm passing as argument of function. Like this:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  void try(char *);
  int main()
  {
      char *result;
      try(result);
      printf("%s",result);
      return 0;
  }
  void try(char *result)
  {
      result="try this";
  }
  </code></pre>
  
  <p>But I'm getting result : <strong>(null)</strong></p>
  
  <p>Could someone tell me what's wrong here?</p>