1. Which gcc option undefines a preprocessor macro?
2. User's Primary Group id is listed in which file, at the time of creation of the user (On a standard Unix system)
3. What is the output of this program?
#include<stdio.h>
#include<fcntl.h>
#include<errno.h>
#include<sys/stat.h>
#include<sys/mman.h>
int main()
{
int s_id;
s_id = shm_open("shared_memory",O_TRUNC,0666);
if(s_id == -1)
perror("shm_open\n");
return 0;
}
#include<stdio.h>
#include<fcntl.h>
#include<errno.h>
#include<sys/stat.h>
#include<sys/mman.h>
int main()
{
int s_id;
s_id = shm_open("shared_memory",O_TRUNC,0666);
if(s_id == -1)
perror("shm_open\n");
return 0;
}
4. fc stands for
5. In linux filesystem, the passwords of different users are stored in
6. What is /proc/[PID]/root?
7. What is the main role of the regular files in the sysfs?
8. Which of the following command provides the list of the functions defined in the login session?
9. If we want to get the exit status that specified targets are up to date or not, we have to execute the make command with option
10. What is the output of this program?
#!/bin/bash
test_var="Example"
echo "$test_var"
echo '$test_var'
echo '"$test_var"'
echo "'$test_var'"
echo \$test_var
exit 0
#!/bin/bash
test_var="Example"
echo "$test_var"
echo '$test_var'
echo '"$test_var"'
echo "'$test_var'"
echo \$test_var
exit 0
Read More Section(Linux)
Each Section contains maximum 100 MCQs question on Linux. To get more questions visit other sections.