Linux Signals


/* Program to  perform operations depending on external signals */

int a,b;
void division(int sig)
int c=0;
c = a/b;
printf(“\n\t QUOTIENT = %d”,c);
printf(“\tSignal = %d\n”,sig);
void mul(int sig)
int c=0;
c = a*b;
printf(“\n\t PRODUCT = %d”,c);
printf(“\tSignal = %d\n”,sig);
void sub(int sig)
int c=0;
c = a-b;
printf(“\n\t DIFFERENCE = %d”,c);
printf(“\tSignal = %d\n”,sig);

void add(int sig)
int c=0;
c= a+b;
printf(“\n\t SUM = %d”,c);
printf(“\tSignal = %d\n”,sig);
int main()
printf(“\n\t Enter first no. : “);
printf(“\n\t Enter second no. : “);
return 0;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s