Assign value to char pointer
#include <stdio.h> int main(void) { char *p, *q; printf("Enter a string: "); p = gets(q); printf(p); return 0; }