#include<stdio.h>
#include<string.h>
int main() {
char str[100], temp;
int i, j = 0;
printf("\nEnter the string :");
i = 0;
while (i < j) {
temp = str[i];
str[i] = str[j];
str[j] = temp;
i++;
j--;
}
printf("\nReverse string is :%s", str
); return (0);
}
I2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8c3RyaW5nLmg+CiAKaW50IG1haW4oKSB7CiAgIGNoYXIgc3RyWzEwMF0sIHRlbXA7CiAgIGludCBpLCBqID0gMDsKIAogICBwcmludGYoIlxuRW50ZXIgdGhlIHN0cmluZyA6Iik7CiAgIGdldHMoc3RyKTsKIAogICBpID0gMDsKICAgaiA9IHN0cmxlbihzdHIpIC0gMTsKIAogICB3aGlsZSAoaSA8IGopIHsKICAgICAgdGVtcCA9IHN0cltpXTsKICAgICAgc3RyW2ldID0gc3RyW2pdOwogICAgICBzdHJbal0gPSB0ZW1wOwogICAgICBpKys7CiAgICAgIGotLTsKICAgfQogCiAgIHByaW50ZigiXG5SZXZlcnNlIHN0cmluZyBpcyA6JXMiLCBzdHIpOwogICByZXR1cm4gKDApOwp9