Question: I have a C program and output, could someone tell me what is tcgetattr(STDIN_FILENO,&term); term.c_lflag &= ~(ICANON) ; tcsetattr(STDIN_FILENO,TCSANOW,&term); fcntl(0, F_SETFL,fcntl(0, F_GETFL) | O_NONBLOCK);

I have a C program and output, could someone tell me what is " tcgetattr(STDIN_FILENO,&term); term.c_lflag &= ~(ICANON) ; tcsetattr(STDIN_FILENO,TCSANOW,&term); fcntl(0, F_SETFL,fcntl(0, F_GETFL) | O_NONBLOCK); " (Line 17 ,18,19, 46) use for?

I have a C program and output, could someone tell me what

is " tcgetattr(STDIN_FILENO,&term); term.c_lflag &= ~(ICANON) ; tcsetattr(STDIN_FILENO,TCSANOW,&term); fcntl(0, F_SETFL,fcntl(0, F_GETFL) |

O_NONBLOCK); " (Line 17 ,18,19, 46) use for? #include #include char input

#include #include char input (); 8 9 10 int main() 12 13 14 15 16 17 18 19 20 21 char in; int t; struct timeval start, end; struct termios term tcgetattr STDIN FILENO,&term); term. c_1flag &= ~(ICANON) ; tcsetattr (STDIN FILENO, TCSANOW,&term): gettimeofday (&start, NULL); while(1) 23 24 25 26 27 28 29 30 31 32 gettimeofday (&end, NULL) t (end.tv_sec 1000000+end.tv usec)- (start.tv_sec 1000000+start.tv_usec); if (t%5000000-=0) printf("Alive at %d milliseconds ", t/1000); in= input ( ); if (in--1) 34 35 36 37 38 39 printf("n Program terminated by user); printf(" total time taken= %d seconds ", break t/1000000); #include #include char input (); 8 9 10 int main() 12 13 14 15 16 17 18 19 20 21 char in; int t; struct timeval start, end; struct termios term tcgetattr STDIN FILENO,&term); term. c_1flag &= ~(ICANON) ; tcsetattr (STDIN FILENO, TCSANOW,&term): gettimeofday (&start, NULL); while(1) 23 24 25 26 27 28 29 30 31 32 gettimeofday (&end, NULL) t (end.tv_sec 1000000+end.tv usec)- (start.tv_sec 1000000+start.tv_usec); if (t%5000000-=0) printf("Alive at %d milliseconds ", t/1000); in= input ( ); if (in--1) 34 35 36 37 38 39 printf("n Program terminated by user); printf(" total time taken= %d seconds ", break t/1000000)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!