Hi Vicky,
0x(arr[1]) is not legal in C, hence you get a compile error.
If your arr[] is already in hex but the elements don't start with "0x", you could convert these elements to hex and then use AI S's suggestions. For instance:
char myHex[100];
int result;
sprintf (myHex, "%d", arr[0]);
result = htoi(myHex);
printf("ASCII %#x = \"%c\"\n", result, result);
You can find implementations for htoi (which converts a hex string to its equivalent int value) on the internet (
here is a link to one implementation).
Note, this might not be an efficient way of doing this since it involves hex conversions back and forth, but it should get you started.
Good luck!
Shakhina P.
NI