Well, firstly, line is a char array, so it can be manipulated in much the same way as char * (see comp.lang.c Frequently Asked Questions for important differences), so you don't need to worry about that.
However, if you want an answer to a general question ...
The & operator is what you need:
char c; char *pChar = &c;
However, keep in mind that pChar is a pointer to char and will only be valid when c is in scope. This means that you cannot return pChar from a function and expect it to work; this will point to some part of the heap, and you cannot expect it to remain valid.
If you want to pass it as a return value, you will need to malloc some memory, and then use a pointer to write the value of c:
char c; char *pChar = malloc(sizeof(char)); *pChar = c;
Dancrumb
source share