I'm trying to build a program which runs in command line written in C looks like that:

```
int main(void){

    char code[25];
    char *fullCmd;
    char *command;
    char *extraCmd;

    bool stop = false;
    int loop = 1;

    while (loop == 1){

        printf("C:\\>");
        scanf("%[^\n]",code);

        fullCmd = strdup(code);
        command = strtok(fullCmd, " ");
        extraCmd = strtok(NULL, " ");
        handStatement(code, command, extraCmd); 

        if(strcmp(command,"exit\n") == 0 || strcmp(command, "quit\n") == 0){
            loop = 0;
            printf("Program Terminated\n");
        }
    }

    return 0;
}

```

`HandStatement()` is one of my handles. But problems in here is that the while loop won't stop for me to enter another command when `handStatement()` is executed. If I don't use while, I can execute one command at a time.