GATE Questions

Q:

Explain fork() system call?

Answer

The `fork()’ used to create a new process from an existing process. The new process is called the child process, and the existing process is called the parent. We can tell which is which by checking the return value from `fork()’. The parent gets the child’s pid returned to him, but the child gets 0 returned to him.

Report Error

View answer Workspace Report Error Discuss

Subject: Operating Systems Exam Prep: GATE

2 6420
Q:

Which among the following are not the children of Swapper or Scheduler?

A) Process Dispatcher B) Vhand
C) Dbflush D) All the above
 
Answer & Explanation Answer: D) All the above

Explanation:

Process Dispatcher,Vhand,Dbflush are the children of Scheduler

Report Error

View Answer Report Error Discuss

Filed Under: Operating Systems
Exam Prep: GATE

0 3963
Q:

What is a shell?

Answer

A shell is an interactive user interface to an operating system services that allows an user to enter commands as character strings or through a graphical user interface. The shell converts them to system calls to the OS or forks off a process to execute the command. System call results and other information from the OS are presented to the user through an interactive interface. Commonly used shells are sh,csh,ks etc.

Report Error

View answer Workspace Report Error Discuss

Subject: Operating Systems Exam Prep: GATE

1 2148
Q:

What is the output of this program ?

class main_arguments {
            public static void main(String [ ] args)
            {
                String [][] argument = new String[2][2];
                int x;
                argument[0] = args;
                x = argument[0].length;
                for (int y = 0; y < x; y++)
                    System.out.print(" " + argument[0][y]);           
            }
        }

A) 1 1 B) 1 0
C) 1 0 3 D) 1 2 3
 
Answer & Explanation Answer: D) 1 2 3

Explanation:

In argument[0] = args;, the reference variable arg[0], which was referring to an array with two elements, is reassigned to an array (args) with three elements.
Output:
$ javac main_arguments.java
$ java main_arguments
1 2 3

Report Error

View Answer Report Error Discuss

Filed Under: Java
Exam Prep: GATE

0 17467
Q:

Fresh fruit contains 68% water and dry fruit contains 20% water. How much dry fruit can be obtained from 100 kg of fresh fruits ?

A) 20 B) 30
C) 40 D) 50
 
Answer & Explanation Answer: C) 40

Explanation:

The fruit content in both the fresh fruit and dry fruit is the same.

 

Given, fresh fruit has 68% water.so remaining 32% is fruit content. weight of fresh fruits is 100kg

 

Dry fruit has 20% water.so remaining 80% is fruit content.let weight if dry fruit be y kg.

 

Fruit % in freshfruit = Fruit% in dryfruit 

 

Therefore, (32/100) x 100 = (80/100 ) x y 

 

we get, y = 40 kg.

Report Error

View Answer Report Error Discuss

Filed Under: Percentage
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

1169 94541
Q:

Which of the following is a Trans- Himalayan river?

A) Ganga B) Yamuna
C) Indus D) Ravi
 
Answer & Explanation Answer: C) Indus

Explanation:

Two sub groups of Himalayan Rivers are Trans Himalayan Rivers and Himalayan Rivers.

  • Trans Himalayan Rivers :

These rivers originate beyond the Himalayas. They are The Indus, The Sutlej and The Brahmaputra Rivers.

 

  • Himalayan Rivers :

These are the rivers originate from Himalayas. They are The Ganga, The Yamuna and their tributaries.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank PO

352 59986
Q:

Motorcycle : Battery :: Life : ?

A) Star B) Moon
C) Sun D) Earth
 
Answer & Explanation Answer: C) Sun

Explanation:

Second is the ultimate source for the first.

That is, Battery is the source of motorcycle. Similarly, Sun is the ultimate source of life.

 

Hence, Motorcycle : Battery :: Life : Sun.

Report Error

View Answer Report Error Discuss

Filed Under: Analogy
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

33 6184
Q:

Heart : Pericardium :: Brain : ?

A) Head B) Bones
C) Cranium D) Skull
 
Answer & Explanation Answer: C) Cranium

Explanation:

Second is a bony protective covering for the first. Here pericardium protects Heart and Cranium protect Brain.

 

Hence, Heart : Pericardium :: Brain : Cranium.

Report Error

View Answer Report Error Discuss

Filed Under: Analogy
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

5 5687