>>51033598Your program is wrong.
char *strrev(char *str)If you do not intend to write to str, the argument should be const, to allow for string literals.
int lengthImplies that the length of the string can be stored in an int. This is wrong on both 16-bit platforms (where int is often 16 bits, and pointers may be more) and 64-bit platforms (where int is often 32 bits, and pointers are 64 bits).
= strlen(str) - 1; /* omit \0 */strlen already omits a \0. So now we're actually one less than the size of the string without null terminator.
strncpy[code]Unnecessary pushing of stack frames when you only need to copy over a single fucking byte. Also, you never null terminated tmp.
Also, your isPrime function returns 1 for num=0, which is wrong. It also loops all the way up to num, which the floor of the square root is fine enough.
[/code]