#include "stdafx.h" #include "string.h" #include "malloc.h" void rev(char *,char *); int _tmain(int argc, _TCHAR* argv[]) { char a[]="this is c programming"; char *end; for(end=a; *end; end++) ; rev(a, end-1); printf("%s",a); return 0; } void rev(char *l, char *p) { char t; while(l < p) { t=*l; *l++ =*p; *p-- =t; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)