Hi everyone!
I'm new at C and I need your help. How do I can input string in string pointer and then show it on terminal?
I tried to do this:
but seems like it's incorrect. Please, help!Code:#include <stdio.h>
#include <string.h>
#define eof '\n'
main()
{
char c, *City1;
malloc();
printf("Please enter first city: ");
while((City1=getchar()) != eof);
}

