How can I exit a while(1) based on a user input?
问题 I have a simple server-client terminals. The server receives strings from the client and processes it. The server will only start processing once it receives the end_of_input character which in my case is '&' . The while loop below is meant to allow a user to input a number of different strings and should stop performing as it receives '&' . while(1) { printf("Enter string to process: "); scanf("%s", client_string); string_size=strlen(client_string); //I want to escape here if client_string