I am looking to understand how to make the program break from a while loop when the user has entered nothing into the command line. The program should only continue looping when the user has entered elements into the command line:
#include <stdio.h>
#include <ctype.h>
int main() {
int ch;
while ((ch == getchar()) != '\n') // read one char: quit?
putchar(toupper(ch)); // upper-case character and print
return 123 ; // Unix: check with: echo $?
