Daily Exam Programmer 26-08-2024

Join us on Telegram


Q 1:

What is the output of this code?

ArrayList<String>list=new

ArrayList<String>();

list.add("A");

list.add("B");

list.add("C");

System.out.printIn(list.get(1));

(1) C
(2) B
(3) A
(4) ABC
Correct Answer: B

Q 2: The method that can retrieve any of the basic SQL data types, is known to be
(1) getDatatype
(2) getString
(3) getLongint
(4) getChar
Correct Answer: getString

Q 3: Which of these method waits for the thread to terminate?
(1) stop()
(2) isAlive()
(3) join()
(4) sleep()
Correct Answer: join()

Q 4:

Consider the two methods (within the same class)

public static int foo(int a, String s)

{

s = "Yellow":

a=a+2;

return a:

}

public static void bar()

{

int a=3;

String s= "Blue":

a = foo(a,s);

System.out.println("a="+a+" s="+s);

}

public static void main(String args[])

{

bar();

}

What is printed on execution of these methods?

(1) a=3 s=Blue
(2) a=5 s=Yellow
(3) a=3 s=Yellow
(4) a=5 s=Blue
Correct Answer: a=5 s=Blue

Q 5: Which of the following is true?
(1) A finally block is executed before the catch block but after the try block.
(2) A finally block is executed, only after the catch block is executed.
(3) A finally block is executed whether an exception is thrown or not.
(4) A finally block is executed, only if an exception occurs.
Correct Answer: A finally block is executed whether an exception is thrown or not.

Q 6: Run time polymorphism is achieved by
(1) Friend function
(2) Virtual function
(3) Operator overloding
(4) Function overloading
Correct Answer: Virtual function

Q 7: RAD model was purposed by
(1) IBM
(2) Motorola
(3) Microsoft
(4) Lucent technologies
Correct Answer: IBM

Q 8: Software testing techniques are most effective if applied immediately after
(1) coding
(2) design
(3) requirement specification
(4) intergration
Correct Answer: design

Q 9: In what manner coding and testing are done
(1) Top-Down
(2) Bottom Up
(3) Cross Action
(4) Adhoc
Correct Answer: Top-Down

Q 10:

The correct order of input form design stages is

  1. Determining the contents of the input
  2. Choosing appropriate input device
  3. Identify the inputs required by the system
  4. Designing forms for input
(1) 3-1-2-4
(2) 1-3-2-4
(3) 1-3-4-2
(4) 3-1-4-2
Correct Answer: 3-1-2-4