91. The file /proc/locks displays the file currently locked by the
92. Which is the correct syntax for sed on command line?
93. In this program
#include<stdio.h>
#include<signal.h>
#include<stdlib.h>
int main()
{
pid_t child;
child=fork();
switch(child){
case -1 :
perror("fork");
exit(1);
case 0 :
while(1){
printf("Child Process\n");
sleep(1);
}
break;
default :
sleep(5);
kill(child,SIGINT);
printf("The child process has been killed by the parent process\n");
break;
}
return 0;
}
#include<stdio.h>
#include<signal.h>
#include<stdlib.h>
int main()
{
pid_t child;
child=fork();
switch(child){
case -1 :
perror("fork");
exit(1);
case 0 :
while(1){
printf("Child Process\n");
sleep(1);
}
break;
default :
sleep(5);
kill(child,SIGINT);
printf("The child process has been killed by the parent process\n");
break;
}
return 0;
}
94. Another signal that cannot be caught is:
95. Sysfs internally stores the pointer to the . . . . . . . . that implements the directory in the file system.
96. The major number identifies the . . . . . . . . associated with the device.
97. In this program the two printed memory locations has the difference of . . . . . . . . bytes.
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *ptr;
ptr = (int*)malloc(sizeof(int)*2);
printf("%p\n",ptr);
printf("%p\n",ptr+1);
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *ptr;
ptr = (int*)malloc(sizeof(int)*2);
printf("%p\n",ptr);
printf("%p\n",ptr+1);
return 0;
}
98. What is the output of this program?
#include<stdio.h>
#include<sys/time.h>
#include<sys/resource.h>
int main()
{
struct rlimit limit;
if(getrlimit(RLIMIT_CORE,&limit) != 0)
perror("getrlimit");
printf("%lu\n",limit.rlim_max);
return 0;
}
#include<stdio.h>
#include<sys/time.h>
#include<sys/resource.h>
int main()
{
struct rlimit limit;
if(getrlimit(RLIMIT_CORE,&limit) != 0)
perror("getrlimit");
printf("%lu\n",limit.rlim_max);
return 0;
}
99. The process of starting up a computer is known as
100. Assemble code of the program can be displayed in GDB by the command
Read More Section(Linux)
Each Section contains maximum 100 MCQs question on Linux. To get more questions visit other sections.