Linux Search Pattern Question: Download Search Pattern PDF

What is the output of this program?

#include<stdio.h>
#include<fcntl.h>

int main()
{
int fd, count;
char ch[10];
fd = open("google.txt",O_RDWR|O_CREAT);
write(fd,"linux",5);
lseek(fd,2,SEEK_END);
write(fd,"san",3);
lseek(fd,0,0);
count = read(fd,ch,10);
printf("%sn",ch);
return 0;
}
a) linux
b) linuxsan
c) linux san
d) none of the mentioned

Tweet Share WhatsApp