I believe you have misunderstood the concepts involved a little bit:
First, "^@^D^@^A49" is not a sequence of hexadecimal digits, it is a visualization of keystrokes. ^@ == CTRL+@ for instance.
Hexadecimal numbers are numbers written on the following form:
0xFF00AB12, that is numbers with radix 16. 0 == 0, 1 == 1, ..., 9 == 9, A == 10, B == 11, ..., F == 15. (The 0x is just a standard prefix used to distinguish a hex value from say a binary or decimal number).
If your aim is to initialize a string or integer with full control of where the bits go, I would recommend reading the input from the keyboard as a string of hexadecimal digits (with or without the prefix, your choice.)
Once you have done that, you may use for instance sscanf to read the string into an integer.
int sscanf ( const char * s, const char * format, ...);
Example:
const char * hexstring = "FF800001";
unsigned int value;
sscanf(hexstring, "%x", &value);