“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”
Read more comments...
Reverse a string.
3,780 Views | (10 votes, avg: 3.4)
strrev(string_to_reverse);
I actually gave the answer above to a MS interviewer. He was not impressed.
void rev(char str[], int len){ if (len>0) { printf(”%c”,str[len-1]); rev(str,len-1); }}
void strrev (char *s){char *t = s + strlen(s) - 1;char ch = ‘
strrev(string_to_reverse);
I actually gave the answer above to a MS interviewer. He was not impressed.
void rev(char str[], int len)
{
if (len>0)
{
printf(”%c”,str[len-1]);
rev(str,len-1);
}
}
void strrev (char *s)
{
char *t = s + strlen(s) - 1;
char ch = ‘