Project Manager Questions


Q:

In the following pieces of code, B and D will compile without any error. True or false ?

A: StringBuffer sb1 = "abcd";

B: Boolean b = new Boolean("abcd");

C: byte b = 255;

D: int x = 0x1234;

E: float fl = 1.2;

A) TRUE B) FALSE
Answer & Explanation Answer: A) TRUE

Explanation:

The code segments B and D will compile without any error. A is not a valid way to construct a StringBuffer, you need to create a StringBuffer object using "new". B is a valid construction of a Boolean (any string other than "true" or "false" to the Boolean constructor will result in a Boolean with a value of "false"). C will fail to compile because the valid range for a byte is -128 to +127 (i.e., 8 bits, signed). D is correct, 0x1234 is the hexadecimal representation in java. E fails to compile because the compiler interprets 1.2 as a double being assigned to a float (down-casting), which is not valid. You either need an explicit cast, as in "(float)1.2" or "1.2f", to indicate a float.

Report Error

View Answer Workspace Report Error Discuss

7 7493
Q:

19 persons do 19 programs in 19 hours . If they take 15 mins interval and then how much time they need to do 52 programs.

A) 23 hours B) 47 hrs 15 min
C) 52 hrs 15 min D) 22 hrs 15 min
 
Answer & Explanation Answer: C) 52 hrs 15 min

Explanation:

Since they can do 19 programs in 19 hours, Then 52 programs in 52 hours respectively.
And a 15 min interval
Total time they take to do 52 programs is 52 hours 15 minutes.

Report Error

View Answer Report Error Discuss

11 7223
Q:

Processor's speed of a computer is measured in

A) Hertz B) Baud
C) MIPS D) BPS
 
Answer & Explanation Answer: A) Hertz

Explanation:

CPU speed is the central factor in a computer's performance. And this CPU speed depends on the processor in the CPU chip. In a computer, clock speed refers to the number of pulses per second generated by an oscillator that sets the tempo for the processor. Clock speed is usually measured in Hertz (Hz).

 

But now-a-days, a pure processor's performance is measured in MIPS (Millions of Instructions Per Second). As here in the question, how a processor's speed is measured is asked and it is Hertz. 

 

Hence, Processor's speed of a computer is measured in Hertz(Hz) [MHz, GHz].

Report Error

View Answer Report Error Discuss

10 6845
Q:

what will be the output of the following code?

class Value
{
    public int i = 15;
}
public class Test
{
    public static void main(String argv[])
    {
        Test t = new Test();
        t.first();
    }
    public void first()
    {
        int i = 5;
        Value v = new Value();
        v.i = 25;
        second(v, i);
        System.out.println(v.i);
    }
    public void second(Value v, int i)
    {
        i = 0;
        v.i = 20;
        Value val = new Value();
        v =  val;
        System.out.println(v.i + " " + i);
    }
}

A) 15 0 2 B) 15 0 0
C) 15 20 0 D) 15 0 20
 
Answer & Explanation Answer: D) 15 0 20

Explanation:
Report Error

View Answer Report Error Discuss

4 6662
Q:

There are 209 doctors and nurses in a hospital. If the ratio of the doctors to the nurses is 11 : 8, then how many nurses are there in the hospital?

A) 88 B) 96
C) 108 D) 121
 
Answer & Explanation Answer: A) 88

Explanation:

Given,
The ratio of the doctors to the nurses is 11 : 8
Number of nurses = 8/19 x 209 = 88.

Report Error

View Answer Report Error Discuss

4 6199
Q:

GUI stands for

A) Graphical Universal Interface B) Graph Use Interface
C) Graphical Unique Interface D) Graphical User Interface
 
Answer & Explanation Answer: D) Graphical User Interface

Explanation:

GUI stands for Graphical User Interface.

 

A Graphical User Interface is a computer interface that allows users to interact with a device through graphical elements such as pictures and animations, as opposed to text-based commands.

Report Error

View Answer Report Error Discuss

9 6079
Q:

Which dml command is used in conjunction with @@identity?

A) INSERT and UPDATE B) UPDATE and DELETE
C) SCOPE_IDENTITY and IDENT_CURRENT D) Commit and rollback
 
Answer & Explanation Answer: C) SCOPE_IDENTITY and IDENT_CURRENT

Explanation:

Using automatically incrementing IDENTITY columns is very popular with database developers. You don’t need to explicitly calculate unique surrogate keys when inserting new data, the IDENTITY column functionality does that for you. The IDENTITY feature also allows you to specify useful Seed and Increment properties. When you use an INSERT statement to insert data into a table with an IDENTITY column defined, SQL Server will generate a new IDENTITY value.

 

You can use the @@IDENTITY variable and the SCOPE_IDENTITY and IDENT_CURRENT functions to return the last IDENTITY value that has been generated by SQL Server. This is very useful when you need to return the key for the row that has just been inserted, back to the caller.

Report Error

View Answer Report Error Discuss

9 6005
Q:

Which of the following is Not an Operating System?

A) UNIX B) Windows NT
C) C++ D) DOS
 
Answer & Explanation Answer: C) C++

Explanation:

C++ is not an Operating System.

 

An Operating System is a collection of system programs that manages all the other programs application programs in a computer as well as the allocation and use of hardware resources such as the CPU, Memory and the Hard Disk Drive.

It acts as an interface between the hardware and the user level program.

It controls and facilitates the overall operation of a computer. 

 

Here

UNIX : UNIX is a popular multi-user, multitasking operating system (OS) developed at Bell Labs.

 

Windows NT : Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993.

 

DOS : DOS is Disk Operating System. The term DOS can refer to any operating system.

 

C++ : C++ is a programming language and computing platform.

 

Hence, C++ is not an Operating System.

Report Error

View Answer Report Error Discuss

9 5916