GATE Questions


Explain fork() system call?


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

1 1645

Ram sell his goods 25% cheaper than Shyam and 25% dearer than Bram. How much % is Bram's good cheaper than Shyam ?

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


Lets say shyam sells at 100,

Since Ram sells 25% cheaper than Shyam,

Therefor Ram sells at less than 25% of100 or 75 rs.

Ram sells 25% dearer than Bram or 125% of Ram =100% of Bram or

125% of x (say x price of bram )=75rs.
or 100% of x =60rs.
hence price of bram is 60rs.

now Bram's good is cheaper than Shyam's as (100-60)x100/100% or 40%.

Hence Brams Good is 40% cheaper than that of Shyam's good.

Report Error

View Answer Workspace Report Error Discuss

6 1608

A number is increased by 20% and then decreased by 20%, the final value of the number is ?

A) increase by 2% B) decrease by 3%
C) decrease by 4% D) increase by 5%
Answer & Explanation Answer: C) decrease by 4%


Here, x = 20 and y = - 20
Therefore, the net % change in value
= %
%  or  - 4%
Since the sign is negative, there is a decrease in value by 4%.

Report Error

View Answer Workspace Report Error Discuss

6 1586

What did the Bhore committee deal with ?

A) Economic development in India B) Health development in India
C) Development of airports in India D) Rural development in India
Answer & Explanation Answer: B) Health development in India

Report Error

View Answer Workspace Report Error Discuss

Filed Under: General Awareness
Exam Prep: GATE
Job Role: Analyst

10 1552

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


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.
$ javac
$ java main_arguments
1 2 3

Report Error

View Answer Workspace Report Error Discuss

Filed Under: Java - Technology
Exam Prep: GATE

0 1480