I am working on a project where I have to take input from a user in the terminal in c until they input quit then I end the program. I realized I cant do this:
#include<stdio.h>
#include<stdlib.h>
int main(int argc, char **argv){
char *i;
while(1){
scanf("%s", i);
/*do my program here*/
myMethod(i);
}
}
So my question is how can I go about taking this coninuous user input? Can I do it with loops or what else can I do?