83.
From where would the read statement read if the following statements were executed?
exec < file1
exec < file2
exec < file3
read line

86.
What is temporary breakpoint?

87.
What is the output of this program?
#include<stdio.h>
#include<sys/time.h>
#include<sys/resource.h>
 
int main()
{
    struct rlimit limit;
    limit.rlim_cur = 10;
    if(setrlimit(RLIMIT_NOFILE,&limit) != 0)
        perror("setrlimit");
    return 0;
}

89.
Given a code snippet below?
#define PERMS  (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
int main() 
{
    int fd1, fd2;
    umask(0);
    fd1 = open(“file1”, O_CREAT | O_RDWR, PERMS)
    umask(S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
    fd2 = open(“file2”, O_CREAT | O_RDWR, PERMS)
    return 0;
}
The newly created files file1 and file2 will have the permissions respectively

90.
What is the output of this program?
#include<stdio.h>
#include<pthread.h>
 
int a;  
void *fun_t(void *arg);
void *fun_t(void *arg)
{       
    printf("%d\n",a);
    pthread_exit("Bye");
}
int main()
{
    pthread_t pt;
    void *res_t;         
    a = 10;
    if(pthread_create(&pt,NULL,fun_t,NULL) != 0)
        perror("pthread_create");
    if(pthread_join(pt,&res_t) != 0)
        perror("pthread_join");
    return 0;
}

Read More Section(Linux)

Each Section contains maximum 100 MCQs question on Linux. To get more questions visit other sections.