31. Which one of the following file contains the environment for the process?
32. An awk program can be run by
33. The file /proc/modules is a text list of
34. What is the output of this program?
#include<stdio.h>
#include<fcntl.h>
#include<sys/stat.h>
#include<semaphore.h>
int main()
{
sem_t* sem_id;
int value;
sem_id = sem_open("new_13",O_CREAT,0666,3);
if(sem_id == SEM_FAILED)
perror("sem_open");
sem_wait(sem_id);
sem_wait(sem_id);
sem_wait(sem_id);
sem_wait(sem_id);
sem_post(sem_id);
sem_post(sem_id);
sem_getvalue(sem_id,&value);
printf("%d\n",value);
if(sem_close(sem_id) == -1)
perror("sem_close");
return 0;
}
#include<stdio.h>
#include<fcntl.h>
#include<sys/stat.h>
#include<semaphore.h>
int main()
{
sem_t* sem_id;
int value;
sem_id = sem_open("new_13",O_CREAT,0666,3);
if(sem_id == SEM_FAILED)
perror("sem_open");
sem_wait(sem_id);
sem_wait(sem_id);
sem_wait(sem_id);
sem_wait(sem_id);
sem_post(sem_id);
sem_post(sem_id);
sem_getvalue(sem_id,&value);
printf("%d\n",value);
if(sem_close(sem_id) == -1)
perror("sem_close");
return 0;
}
35. Which command executes 'command' in place of the current process instead of creating a new process?
36. Which gcc option turns off certain features of gcc that are incompatible with ISO C89?
37. What control character signals the end of the input file?
38. The file fs/sysfs/sysfs.h contains the
39. Which command gives the first byte where the difference is in the file1 & file2?
40. The break statement
Read More Section(Linux)
Each Section contains maximum 100 MCQs question on Linux. To get more questions visit other sections.