Daily Exam Programmer 30-08-2024

Join us on Telegram


Q 1: How many bits are in Ethernet address?
(1) 32
(2) 16
(3) 64
(4) 48
Correct Answer: 48

Q 2: Waterfall model is not suitable for
(1) Complex Projects
(2) Small Projects
(3) Accommodating Change
(4) None of the above
Correct Answer: Accommodating Change

Q 3: McCall has developed a
(1) Quality model
(2) Process improvement model
(3) Requirement model
(4) Design Model
Correct Answer: Quality model

Q 4: What is the following language is Architecture-Neutral?
(1) Java
(2) C++
(3) C
(4) Pascal
Correct Answer: Java

Q 5:  What will be the output of the program?

TreeSet map = new TreeSet();

map.add("one");

map.add("two");

map.add("three");

map.add("four");

map.add("one");

Iterator it = map.iterator();

while (it.hasNext())

System.out.print(it.next() +"");

}

(1) one two three four
(2) four three two one
(3) four one three two
(4) one two three four one
Correct Answer: four one three two

Q 6:

Which of the following statements about the hashcode() method are incorrect?

1. The value returned by hashcode() is used in some collection classes to help locate objects.

2. The hashcode() method is required to return a positive int value.

3. The hashcode() method in the String class is the one inherited from Object.

4. Two new empty String objects will produce identical hashcodes.

(1) 1 and 2
(2) 2 and 3
(3) 3 and 4
(4) 1 and 4
Correct Answer: 2 and 3

Q 7: Which statement is true?
(1) If an exception is thrown during the execution of the finalize() method of an eligible object, then the exception is ignored and the object is destroyed
(2) All objects have a finalize() method
(3) Objects can be destroyed by explicitly calling the finalize() method
(4) The finalize() method can be declared with any accessibility
Correct Answer: All objects have a finalize() method

Q 8:

What is the output of this program?

void main()

{

int a =5, b=10,c=15;

int *arr[]={&a, &b, &c];

cout << arr[1];

};

(1) 10
(2) 5
(3) 15
(4) Address of b
Correct Answer: Address of b

Q 9: Which class allows only one object to be crated ?
(1) Nuclear Family Class
(2) Abstract Class
(3) Singleton Class
(4) Single Class
Correct Answer: Singleton Class

Q 10:

Which of the following statements is guaranteed to pass the variable number by value to the sub procedure Tally?

(1) Tally (num Var)
(2) Tally (By Valnum Var)
(3) Tally (num Var)
(4) Tally (By Valnum Var As Double)
Correct Answer: Tally (By Valnum Var As Double)