title: strings in C, (i'm newbie in C)
body: <p>I'm newbie in C language, so probably this is a stupid qeustions, but i don't know what to do. this is my trouble:</p>
  
  <p>why this code doesn't print nothing?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  
  void function(char* valor);
  
  main()
  {
  char* valor;
  int s;
  
      valor=(char*)malloc(101*sizeof(char));
      function(valor);
      printf("%s\n",valor);
  
  return 0;
  }
  
  void function(char* valor)
  {
  
      valor="ciao";
  
  }    
  </code></pre>
  
  <p>and this print the string i want? ("ciao")</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  main()
  {
  char* valor;
  
      valor=(char*)malloc(101*sizeof(char));
      valor="ciao";
      printf("%s\n",valor);
  
  return 0;
  }
  </code></pre>