I receiving an incorrect strlen value of a, it return 101 instead of 100, has anyone come across this error before? Has it been corrupted during conversion.
The block of memory returned from malloc is uninitialised. You then fill those blocks of memory with a character, but never null terminate the sequence. strlen just counts the number of characters up to the first null. As you never set a null, strlen has marched off the end of your buffer and found a null somewhere else.
You should note that the resuts of this program are non-deterministic and will different results on different systems.
The strlen function tells you how many chars there are from a pointer position, to the next zero value in memory. How do you know that the next zero value is after 100 chars? Where in your code did you write that zero value?