#include "stdafx.h"
#include<iostream>
#include<string>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char c;
int a=1;
c=a+'0';
cout<<c<<endl;
int num=12345;
char *cnum = new char[5];
int i=0;
while(num){
int decate = num%10;
cnum[i++]=decate+'0';
num=num/10;
}
int len = sizeof(cnum)/sizeof(char);
cout<<len<<endl;
for(int i=0;i<len/2;i++){
int temp=cnum[i];
cnum[i]=cnum[len-i];
cnum[len-i]=temp;
}
cout<<cnum<<endl;
return 0;
}
|