MCQ Tutorial Search
Home Search Add Question Today's History Discussion Board Job Portal Linux Linux Basics File and Folder
Environment Command

Process

Memory Shell Programming Mock Test Contact Feedback
Home
Search
Add Question
Today's History
Discussion Board
Job Portal
Linux
Linux Basics
File and Folder
Environment
Command

Process

Memory
Shell Programming
Mock Test
Subscribe/Unsubscribe
Email:
Social Media
Facebook

Misc Tutorials

References

Question and Answer Tutorial
Tutorials Point
Stack Overflow

MCQ Tutorial - Linux->Process

First Previous 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Next Last
66.) What is the output of the below code?

    void exit_handler1();
    void exit_handler2();
    int main() {
        int pid;
        atexit(exit_handler1);
        atexit(exit_handler2);
        pid = fork();
        if(pid == 0) {
           _exit(0);
        } else {
            sleep(2);
            exit(0);
        }
        return 0;
    }
Options are:
A.) Neither parent nor child executes the exit_handler 1 and 2.
B.) Only parent executes the exit_handler 1 and 2.
C.) Only child executes the exit_handler 1 and 2.
D.) Both parent and child executes the exit_handler 1 and 2.
                        
67.) What is output of the following program?
    
    int main() {
        fork();
        fork();
        fork();
        if (wait(0) == -1)
            printf("leaf child
");
    }
Options are:
A.) "leaf child" will be printed 8 times
B.) "leaf child" will be printed 4 times
C.) "leaf child" will be printed 1 times
D.) "leaf child" will be printed 3 times
                        
68.) Return value of fork() system call can be:
Options are:
A.) -1 or <0 or 0
B.) -1 or 0
C.) True or false
D.) -1 or >0 or 0
69.) Solaris System class priority is
Options are:
A.) 0-59
B.) 160-169
C.) 60-99
D.) 100-159
70.) Which one of the following command creates the executable file a.out?
Options are:
A.) gcc -o mcqtutorial.c
B.) gcc -o a.out
C.) gcc a.out
D.) gcc mcqtutorial.c
                        
                        
First Previous 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Next Last
Comment:
Name:Email:
Contact No.:
Copyright © 2014 by SBJ Group. All Rights Reserved. Developed and maintained by SBJ Group. Supported on Internet Explorer browser only