11. If we compile the example.c file with the command "gcc -c example.c", then the output file will be
12. When mv f1 f2 is executed which file's inode is freed?
13. How to execute ls command inside a vi editor?
14. Unix is which kind of Operating System?
15. Which one of the directory does not contain binary files?
16. If a program is linked against a static library then
17. By default if any regular file is created, the number of link is displayed as 1 ?
18. Which is loaded into memory when system is booted?
19. Which one of the following statement is not true about the format-control letters for printf statement in awk program?
20. What is the output of this program?
#include<stdio.h>
#include<stdlib.h>
#include<fcntl.h>
int main()
{
int fd, new_fd;
char *buff;
buff = (char *)malloc(sizeof(char)*8);
fd = open("test.c",O_RDONLY);
new_fd = dup(fd);
close(fd);
read(new_fd,buff,8);
printf("%s\n",buff);
}
#include<stdio.h>
#include<stdlib.h>
#include<fcntl.h>
int main()
{
int fd, new_fd;
char *buff;
buff = (char *)malloc(sizeof(char)*8);
fd = open("test.c",O_RDONLY);
new_fd = dup(fd);
close(fd);
read(new_fd,buff,8);
printf("%s\n",buff);
}
Read More Section(Linux)
Each Section contains maximum 100 MCQs question on Linux. To get more questions visit other sections.