Answers for "get c character without enter"

C
0

read enter in c

char prev = 0;

while(1) {
    char c = getchar();
    if (c == 'n' && prev == c) break; // double return pressed!
    prev = c; 
}
Posted by: Guest on January-17-2021

Code answers related to "get c character without enter"

Code answers related to "C"

Browse Popular Code Answers by Language