title: Finding the length of a character array in c++
body: <p>I have an character array of the form</p>
  
  <blockquote>
    <p>char x[]='asdasdadsadasdas';<br>
    int p = sizeof(x)/sizeof(*x)</p>
  </blockquote>
  
  <p>gives me correct result but when I pass this as an argument in another function like</p>
  
  <blockquote>
    <p>void X(char* a)</p>
    
    <blockquote>
      <p>int i = sizeof(a)/sizeof(*a)</p>
    </blockquote>
  </blockquote>
  
  <p>and I call it </p>
  
  <blockquote>
    <p>X(x)</p>
  </blockquote>
  
  <p>p and i are not equal.How is it possible ?</p>