Friday, October 16, 2009

CTRL+D and CTRL+L signal handling


Code:
#include 

int main()
{
char c;
printf("Write: ");
scanf("%c", &c);
if(c == 0x0C) printf("ctrl+L was entered\n");
return 1;
}
but the execution of this doesnt..
Code:
#include 

int main()
{
char c;
printf("Write: ");
scanf("%c", &c);
if(c == 0x04) printf("ctrl+D was entered\n");
return 1;
}

No comments: