Programming Fundamentals: Data Structures, OOP, and Java
Covers fundamental programming concepts including data structures, object-oriented programming principles, C/C++ features, and Java programming including applets, events, and JDBC
Questions
Which of the following non-linear data structures is having a hierarchical relationship among its elements called nodes?
- Linked lists
- Stacks
- Trees
- Queues
Which of the following is a collection of logically related variables referenced under one name?
- Array
- Union
- Structure
- Tokens
The 'isdigit()' built-in function belongs to __________ header file in C++.
- string.h
- math.h
- ctype.h
- conio.h
Which of the following methods of passing of arguments to a function passes the copy of the arguments to the called function?
- Call by Reference
- Call by Value
- Global function
- None of these
Which of the following properties of OOP decomposes a system into a set of cohesive and loosely coupled modules?
- Inheritance
- Polymorphism
- Modularity
- None of these
Which of the following expressions is one where operators are placed after the operands and it is also called as reverse polish notation?
- Prefix expression
- Infix expression
- Postfix expression
- Pushing
In OOP, which of the following is an identifiable entity with some characteristics and behaviour?
- Object
- Class
- Encapsulation
- None of these
Which of the following Event objects is generated when the text of a text component is modified?
- MouseEvent
- PaintEvent
- KeyEvent
- TextEvent
Which of the following methods in Java is used in applet programming to draw the graphics of the applet in the drawing area?
- update()
- paint()
- repaint()
- none of these
___________ is the form of inheritance in which many sub classes are inherited from a single base class.
- Multiple inheritance
- Hierarchical inheritance
- Multilevel inheritance
- None of these
Which of the following sorting techniques compares two adjoining values and exchange them if they are not in proper order?
- Insertion sort
- Bubble sort
- Selection sort
- None of these
Which of the following are the user interface of Applet defines how the components will be arranged in a container?
- Components
- Checkboxes
- Layout managers
- None of these
Which of the following methods is used to revert the characters within a StringBuffer object?
- delete()
- insert()
- reverse()
- none of these
Which of the following objects in C++ does not take any arguments?
- Friend Function
- Inline Function
- Default Constructor
- Constructor
Which of the following Java tools is used when you want to document the java source file with proper comment entries?
- jdb
- java
- javadoc
- javap
Which of the following methods of String class searches for the first occurrence of a character or substring?
- indexOf()
- lastIndexOf()
- compareTo()
- none of these
Which of the following applications of Java consists of text files that combines standard HTML and new scripting tags?
- Servlets
- JavaServer Pages (JSP)
- JavaBeans
- None of these
Which of the following methods is used to preallocate room for a certain number of characters after a StringBuffer has been constructed?
- setLength()
- charAt()
- ensureCapacity()
- none of these
Which of the following components of an Event is an object that generates an event?
- Event handler
- Event class
- Event source
- None of these
The events like BLOCK_DECREMENT, BLOCK_INCREMENT belong to which of the following classes in Java?
- ComponentEvent class
- AdjustmentEvent
- ActionEvent class
- ItemEvent class
Which of the following Java tools provides a database programming interface for Java programs?
- Appletviewer
- ODBC
- JDBC
- None of these
Which of the following methods in Random Access Files return the current location of the file pointer?
- seek()
- getFilePointer()
- length()
- none of these
Which of the following classes in Java implements the corresponding listener interfaces containing more than one method?
- WindowEvent class
- MouseEvent class
- Adapter class
- None of these