Select the correct option to test your answer:
Computer Science Engineering
Linux
Difficulty: Medium
Below is the code int main() { int fd1, fd2; struct stat buff1, buff2; fd1 = open(“1.txt”, O_RDWR); fd2 = open(“2.txt”, O_RDWR | O_APPEND); lseek(fd1, 10000, SEEK_SET); write(fd1, “abcdefghij”, 10); write(fd2, “abcdefghij”, 10); fstat(fd1, &buff1); fstat(fd2, &buff2); printf(“ %d %d”, buff1.st_size, buff2.st_size); return 0; } Before running the program, the file 1.txt and 2.txt size is 20 each. What is the output?
More Computer Science Engineering Questions
What happens as the SIGINT signal hits the running process of this program? #include<stdio.h> #include<signal.h> #include<stdlib.h> int main() { pid_t child; signal(SIGINT,SIG_IGN); child=fork(); switch(child){ case -1: perror("fork"); exit(1); case 0: while(1){ printf("Child Process\n"); sleep(1); } break; default : while(1){ printf("Parent Process\n"); pause(); } break; } return 0; }
Which search uses only the linear space for searching?
How many ALU(s) is/are control by one control unit is SIMD (single instruction stream, multiple data stream) architecture?
The status register of the 68000 has . . . . . . . . condition codes.
The contents of file001 are: 232 25*50 What will be the contents of result.txt? bc < file001 > result.txt