Conver char value to variable? I want to pass the preprocessor values(AT commands) to the Serial.println function. Im trying TCP connection using arduino-SIM900A. I've declared all AT commands to each preprocessor variables like below

#define A "AT\r"
#define B "AT+CPIN?\"
...


I've assigned all preprocessor variables in char array and pass it into Serial.print using for loop.

char varAT[12]={'A','B'....};
for(int i=0;i&lt;=12;i++)
{
Serial.print(varAT[i]);
}


Its not printing AT, instead it print preprocessor variable name A. I searched the google how to convert char value to variable, in C there is a function called "eval". Using eval we can acheive, but it wont work in arduino lang. How to solve this?

Thanks.
Ok, first, char varAT[12] indicates an array of 12 characters. 

Second, quotes indicate literals - 'A' means, literally, the character 'A'. Variables and constants are without quotes (same way you use  i).

I think you mean:

char *varAT[12]={A,B....};


Also, your constant B is invalid - I think you meant for it to end in \r", not \".