Assignment makes pointer from integer without a cast and vice versa in c

As your compiler will have told you, pointer from integer without a cast is at

j=(str[N-1]);

And integer from pointer is at

str[0]=j;

You should have declared j as char j;

Leave a Comment