Search found 1 match

by lucasbls1
Tue Mar 17, 2009 9:17 pm
Forum: Volume 100 (10000-10099)
Topic: 10018 - Reverse and Add
Replies: 169
Views: 44391

Re: 10018 - Reverse and Add

I don't know what's wrong with my code,
please somebody help me..

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

void str_reverse(char* str)
{
char ch;
int i, j;

for(i = 0, j = strlen(str) - 1; i < j; ++i, --j)
{
ch = str ;
str = str[j];
str[j] = ch;
}
}

main()
{
int qtde ...

Go to advanced search