> trying to return local variable value back from function!
Nothing wrong with that. The problem is to return an address/reference to a local variable.
@FastLearner:constchar* bpl[] = {"cAr","Pen", "hOmE", "coMputeR"};
And use delete[] if you allocated with new[]
@OP:
> i don't want to use string.h library.
You are using it, for `strlen()'
Also, main must return int
Thanks ne555. I had forgotten that I cannot assign a new value to a constant. Since it is an array of string literals, it produces an error. Also thanks for noting my mistake with new[] and delete[]