I’m practicing C programming for Linux for an exam.
I don’t know how to exit the program when user press Ctrl + a ( not Ctrl+c )
For example, looping something until user press Ctrl+a
Could anyone tell me how to check Ctrl+a input?
Notes: I’m using ‘gcc’ and run output with ‘./a.out’
Thanks in advance for everyone!
did you looking for something like this ???
this program won’t be stopped since you hit ctrl+A and Enter.
But if you wanna terminate your program just after pressing ctrl+A (without hitting enter after that), here you are:
for compiling second code using GCC, try this command: