Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
Write a fucntion that will reverse a string.
Write a fucntion that will reverse a string.
✍: Guest
char *strrev(char *s)
{
int i = 0, len = strlen(s);
char *str;
if ((str = (char *)malloc(len+1)) == NULL)
/*cannot allocate memory */
err_num = 2;
return (str);
}
while(len)
str[i++]=s[–len];
str[i] = NULL;
return (str);
}
2012-04-11, 2913👍, 0💬
Popular Posts:
How was XML handled during COM times? During COM it was done by using MSXML 4.0. So old languages li...
What print out will the folloging code produce? main() { char *p1=“name”; char *p2; p2=(char*)malloc...
How can method defined in multiple base classes with same name be invoked from derived class simulta...
What is the output of printf("%d")? 1. When we write printf("%d",x); this means compiler will print ...
Jack developed a program by using a Map container to hold key/value pairs. He wanted to make a chang...