Is it possible to use strlen
while declaring a new string?
Example:
char a[]="Hello world";
char b[strlen(a)]; // alloc memory to string b equal to the string length of a
If not, then what is the solution if I don't want to directly enter the length of another string?
And I'm unable to use the strrev
function. I get the following error
error-implicit declaration of function 'strrev' is invalid in C99
How to fix this?