Exit Exam Questions - Updated
Exit Exam Questions - Updated
1. One of the pillars of object-oriented concept in which it considers the complexity nature
of the program by ignoring the irrelevant background detail refers _______________
A. Abstraction
B. Encapsulation
C. Inheritance
D. Polymorphism
2. Which among the following is not a feature of Java:
A) Portable
B) Structured
C) Distributed
D) High Performance
3. Which of the following is a keyword used to create an object of a class?
A) New
B) Old
C) public
D) static
4. Which of the following allows the creation of hierarchical classifications?
A) Interface
B) Inheritance
C) Package
D) Polymorphism
5. A class member that has been declared as private will be ___ to its class.
A) Friendly
B) Public
C) Protected
D) Private
6. The process of responding the same message in different way refers ____________
A. Abstraction
B. Encapsulation
C. Inheritance
D, Polymorphism
7. Supposed you already have declared three variables: x of integer type, y of string type
and z of char type. Then which of the following assignments is/are correct?
A. x = 3.1;
B. z = k;
C. y = “Asefa”;
D. x = z;
8. Which of the followings are true about object-oriented programing paradigm in java?
E. The primary focus of object-oriented paradigm is data rather than function
F. Data and method are tightly connected
G. Data and method are loosely connected
H. The smallest unit is an object
I. All except C
9. A special method that is used to initialize the data members of the given class when the
object is created refers ___________________
A, Inheritance B, Constructor C, Interface D, Object
10. A method is a block of code which only runs when it is called.
A, True B, False
11. Suppose you have defined a class named Item that contain a public field of itemPrice
and a main() method. When you write a main () method, you created an Item object
named itemOne. Which one of the following is correct statement to display the
object’s itemPrice from the main method in java?
A. cout<<itemPrice; C. System.ou.print(Item.itemOne);
B. System.out.print(itemPrice); D. System.ou.print(itemOne.itemPrice);
12. All of the following are C++ data types except ___________ .
A) letter
B) char
C) double
D) int
13. In C++, what is the result of 5 + 4 * 3 + 2?
A) 14
B) 29
C) 19
D) 54
14. In C++, what is the result of 19 % 2?
A) 0
B) 9
C) 1
D) 19
15. If a and b are integers, and a = 10 and b = 30, if you use the statement a += b, what is
the resulting value of a?
A) 10
B) 30
C) 20
D) 40
16. If c and d are integers, and d = 34, what is the value of c = d++?
A) 0
B) 34
C) 1
D) 35
17. Which of the following is a reserved word in C++?
a. new b. main c. return d. void e. all
18. Which of the following is not correct variable declaration in c++?
a. 12A b. A12 c. a12 d. _A12 e. all
24. A graphical user interface (GUI) allows a user to interact visually with a program.
A, True B, False
26. A Form is a graphical interface which contains controls like textbox, buttons, labels etc.
A, True B, False
27. We can select two options from Radio button lists.
A, True B, False