don't understand

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2004
Posts: 65
Reputation: koh is an unknown quantity at this point 
Solved Threads: 0
koh koh is offline Offline
Junior Poster in Training

don't understand

 
0
  #1
Jul 23rd, 2004
this is a copy of c language that i copied from the date of 19 july.
i just started to learn c++, so i don't really understand the syntax for c..
can some one explain to me how it works to "so called mirror" the words or integers. thank you
need it urgently....



#include <stdio.h>

char *f(char*s)
{char*t=s,*u=t;
while(*u)++u;--u;

while(t<u){char x=*t;*t++=*u;*u--=x;}return s;}

int main ( void )
{

char text[] = "bvx";
puts ( text );
puts ( f ( text ) );
return 0;
}



/* my output
The quick brown fox
xof nworb kciuq ehT
*/
Reply With Quote Quick reply to this message  
Join Date: Jun 2003
Posts: 313
Reputation: red_evolve is on a distinguished road 
Solved Threads: 0
red_evolve's Avatar
red_evolve red_evolve is offline Offline
Posting Whiz

Re: don't understand

 
0
  #2
Jul 23rd, 2004
Greetings, koh.
Check this thread out.
http://www.daniweb.com/techtalkforums/thread8074.html
"Study the past if you would define the future" - Confucius
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC