Search Pattern

  Home  Operating System Linux  Search Pattern


“Linux Search Pattern frequently Asked Questions by expert members with experience in Search Pattern. These questions and answers will help you strengthen your technical skills, prepare for the new job test and quickly revise the concepts”



45 Search Pattern Questions And Answers

21⟩ In the output of this program, the string "/* Linux */" will be added at the ____ of the source file. #include<stdio.h> #include<stdlib.h> #include<fcntl.h> int main() { int fd; fd = open("san.c",O_RDWR|O_APPEND); write(fd,"/* Linux */",11); return 0; } a) end b) beginning c) second line d) third line

a) end

Explanation:

The write system call writes at the end of the file because the file is opened with O_APPEND flag.

Output:

[root@localhost google]# gcc -o san san.c

[root@localhost google]# ./san

[root@localhost google]# vim san.c

[root@localhost google]#

 182 views