Q:

Inbuilt functions in linux terminal

Why "strrev()" and some other inbuilt string functions in c doesn't work in terminal?
#include<stdio.h>
main()
{
char c[50];
scanf("%s",c);
strrev(c);
printf("%s",c)
}

A:

strrev is not standard, but can be easily implemented
void strrev(char *s) {
    int i,n = strlen(s);
    for(i=n/2 ; i>=0 ; i--) {
        char c = s[i];
        s[i] = s[n-i-1];
        s[n-i-1] = c;
    }
}

