```
 char *str[]={"we", "will", "teach", "you"};
 int count=0;i,len,m;

```

The sizeof(str) should return the value 18, while it returns a value 32 in codeblocks.
Moving forward if it returns the length of the string correctly, knowing the fact that this character array is stored in continous memory location, we can count the number of times "\0" appears as we traverse our array.

And this value would give us the index of the last string.
I tried in the following manner:

```
int len=sizeof(str);

m=str[0]; //assign the base address of 1st string
for(i=0;i<len;i++)
{
   if(*(m+i)=="\0") //compare the value at memory location with null
   count++;
 }
 printf("%d", count);

```

If somebody could provide me with an insight whether my approach is correct, or some other solution.
Basically want to find the index of the last string, or the number of strings present, when the number of strings in the array cannot be counted.