81. Filesystem for CDROM is:
82. One of the entry of /etc/passwd file is shown below:
user1:x:1111:2222:Example:/home/user1:/bin/bash
Which among the following will print userid and home dir in the following pattern “user1:/home/user1”
user1:x:1111:2222:Example:/home/user1:/bin/bash
Which among the following will print userid and home dir in the following pattern “user1:/home/user1”83. What is the output of the following program?
[ -n $HOME ]
echo $?
[ -z $HOME ]
echo $?
[ -n $HOME ]
echo $?
[ -z $HOME ]
echo $?
84. The file /proc/devices is the
85. Which of the following is true?
86. For debugging with GDB, the file "example" can be created with the command
87. On x86-32 Linux, at which address the code segment of the program starts?
88. Which one of the following string will print first by this program?
#include<stdio.h>
#include<pthread.h>
#include<semaphore.h>
sem_t st;
void *fun_t(void *arg);
void *fun_t(void *arg)
{
printf("Linux\n");
sem_post(&st);
pthread_exit("Bye");
}
int main()
{
pthread_t pt;
void *res_t;
if(pthread_create(&pt,NULL,fun_t,NULL) == -1)
perror("pthread_create");
if(sem_init(&st,0,0) != 0)
perror("sem_init");
if(sem_wait(&st) != 0)
perror("sem_wait");
printf("Example\n");
if(pthread_join(pt,&res_t) == -1)
perror("pthread_join");
if(sem_destroy(&st) != 0)
perror("sem_destroy");
return 0;
}
#include<stdio.h>
#include<pthread.h>
#include<semaphore.h>
sem_t st;
void *fun_t(void *arg);
void *fun_t(void *arg)
{
printf("Linux\n");
sem_post(&st);
pthread_exit("Bye");
}
int main()
{
pthread_t pt;
void *res_t;
if(pthread_create(&pt,NULL,fun_t,NULL) == -1)
perror("pthread_create");
if(sem_init(&st,0,0) != 0)
perror("sem_init");
if(sem_wait(&st) != 0)
perror("sem_wait");
printf("Example\n");
if(pthread_join(pt,&res_t) == -1)
perror("pthread_join");
if(sem_destroy(&st) != 0)
perror("sem_destroy");
return 0;
}
89. Which one can be a real time schedule policy?
90. Most files and directories within /proc are 0 bytes in size because
Read More Section(Linux)
Each Section contains maximum 100 MCQs question on Linux. To get more questions visit other sections.