Consider,
NSString *myString = @\"Welcome\";
NSLog(@\"%@\",myString);
will print Welcome
in console.
Can I print the
Use the following code:
#define stringVariable(x) NSLog( @"%s:%@",#x, x)
NSString *myString=@"Welcome";
stringVariable(myString);
Note: The general principle is that when you put a # in front of an argument within the body of a #define, the preprocessor replaces it with a C string of the exact expression passed to the macro. When you pass a variable name, you'll get that name.