Q 1: | Which of the following is not a type of constructor? |
(1) | Default constructor |
(2) | Friend constructor |
(3) | parameterized constructor |
(4) | Copy constructor |
Correct Answer: Friend constructor | |
Q 2: |
What is the correct order of defining a Class? 1. The name of the class's parent (super class), if any, preceded by the keyword extends. A class can only extend (subclass) one parent. 2. The class name, with the initial letter capitalized by convention. 3. Modifiers such as public, private, and a number of others that you will encounter later. 4. The class body, surrounded by braces, {}. 5. Acomma-separated list of interfaces implemented by the class, if any, preceded by the keyword implements. A class can implement more than one interface. |
(1) | 3,1,2,5,4 |
(2) | 1,2,3,5,4 |
(3) | 3,2,1,5,4 |
(4) | 5,1,2,3,4 |
Correct Answer: 3,2,1,5,4 | |
Q 3: | Which of the following statements |
(1) | Java threads don't allow parts of a program to be executed in parallel |
(2) | Java is a single-threaded language |
(3) | Java's garbage collector runs as a high priority thread |
(4) | Ready, running and sleeping are three states that a thread can be in during its life cycle |
Correct Answer: Ready, running and sleeping are three states that a thread can be in during its life cycle | |
Q 4: | Which of the following access specifier is used as a default in a class definition? |
(1) | private |
(2) | protected |
(3) | public |
(4) | friend |
Correct Answer: private | |
Q 5: | Which one is not a category of COCOMO-II? |
(1) | End User Programming |
(2) | Infrastructure Sector |
(3) | Requirement Sector |
(4) | System Integration |
Correct Answer: Requirement Sector | |
Q 6: | In C++, a destructor takes |
(1) | One argument |
(2) | Two arguments |
(3) | Three arguments |
(4) | Zero arguments |
Correct Answer: Zero arguments | |
Q 7: | In COCOMO model, if project size is typically 2-50 KLOC, then which mode is to be selected? |
(1) | Organic |
(2) | Embedded |
(3) | Semidetached |
(4) | None of the above |
Correct Answer: Organic | |
Q 8: |
Which of these classes is related to all the exceptions that cannot be caught? |
(1) | Error |
(2) | Exception |
(3) | Runtime Exception |
(4) | All of the mentioned |
Correct Answer: Error | |
Q 9: | Cost estimation for a project may include |
(1) | Hardware Cost |
(2) | Software Cost |
(3) | Personnel Costs |
(4) | All of the above |
Correct Answer: All of the above | |
Q 10: | In C++, a function contained within a class |
(1) | A member function |
(2) | An operator |
(3) | A class function |
(4) | A method |
Correct Answer: A member function | |