title: pointer in c program
body: <p>program in c language</p>
  
  <pre><code>void main()      
  {
   char *a,*b;    
   a[0]='s';    
   a[1]='a';    
   a[2]='n';    
   a[3]='j';    
   a[4]='i';   
   a[5]='t';   
   printf("length of a %d/n", strlen(a));  
   b[0]='s';  
   b[1]='a';   
   b[2]='n';   
   b[3]='j';   
   b[4]='i';  
   b[5]='t';       
   b[6]='g';      
   printf("length of b %d\n", strlen(b));  
  }
  </code></pre>
  
  <p>here the output is :   </p>
  
  <pre><code>length of a 6    
  length of b 12
  </code></pre>
  
  <p>Why and please explain it.</p>
  
  <p>thanks in advance.</p>