converting to hexa

this is my code
i don't understand,why my result 12cA is?
please explain to me.
thanks a lot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Example1.cpp : Defines the entry point for the console application.
//

#include"stdafx.h"
#include<iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
	char s[]="1234567890";
	unsigned *p=(unsigned *)&s[2];
	*p=0x4163;
	cout<<(char)(*(p+1))<<endl;
	system("pause");
	return 0;
}
///result on the screen:12cA////////i don't understand.although it is correctly// 


Topic archived. No new replies allowed.