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

23 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following non-linear data structures is having a hierarchical relationship among its elements called nodes?

  1. Linked lists
  2. Stacks
  3. Trees
  4. Queues
Question 2 Multiple Choice (Single Answer)

Which of the following is a collection of logically related variables referenced under one name?

  1. Array
  2. Union
  3. Structure
  4. Tokens
Question 3 Multiple Choice (Single Answer)

The 'isdigit()' built-in function belongs to __________ header file in C++.

  1. string.h
  2. math.h
  3. ctype.h
  4. conio.h
Question 4 Multiple Choice (Single Answer)

Which of the following methods of passing of arguments to a function passes the copy of the arguments to the called function?

  1. Call by Reference
  2. Call by Value
  3. Global function
  4. None of these
Question 5 Multiple Choice (Single Answer)

Which of the following properties of OOP decomposes a system into a set of cohesive and loosely coupled modules?

  1. Inheritance
  2. Polymorphism
  3. Modularity
  4. None of these
Question 6 Multiple Choice (Single Answer)

Which of the following expressions is one where operators are placed after the operands and it is also called as reverse polish notation?

  1. Prefix expression
  2. Infix expression
  3. Postfix expression
  4. Pushing
Question 7 Multiple Choice (Single Answer)

In OOP, which of the following is an identifiable entity with some characteristics and behaviour?

  1. Object
  2. Class
  3. Encapsulation
  4. None of these
Question 8 Multiple Choice (Single Answer)

Which of the following Event objects is generated when the text of a text component is modified?

  1. MouseEvent
  2. PaintEvent
  3. KeyEvent
  4. TextEvent
Question 9 Multiple Choice (Single Answer)

Which of the following methods in Java is used in applet programming to draw the graphics of the applet in the drawing area?

  1. update()
  2. paint()
  3. repaint()
  4. none of these
Question 10 Multiple Choice (Single Answer)

___________ is the form of inheritance in which many sub classes are inherited from a single base class.

  1. Multiple inheritance
  2. Hierarchical inheritance
  3. Multilevel inheritance
  4. None of these
Question 11 Multiple Choice (Single Answer)

Which of the following sorting techniques compares two adjoining values and exchange them if they are not in proper order?

  1. Insertion sort
  2. Bubble sort
  3. Selection sort
  4. None of these
Question 12 Multiple Choice (Single Answer)

Which of the following are the user interface of Applet defines how the components will be arranged in a container?

  1. Components
  2. Checkboxes
  3. Layout managers
  4. None of these
Question 13 Multiple Choice (Single Answer)

Which of the following methods is used to revert the characters within a StringBuffer object?

  1. delete()
  2. insert()
  3. reverse()
  4. none of these
Question 14 Multiple Choice (Single Answer)

Which of the following objects in C++ does not take any arguments?

  1. Friend Function
  2. Inline Function
  3. Default Constructor
  4. Constructor
Question 15 Multiple Choice (Single Answer)

Which of the following Java tools is used when you want to document the java source file with proper comment entries?

  1. jdb
  2. java
  3. javadoc
  4. javap
Question 16 Multiple Choice (Single Answer)

Which of the following methods of String class searches for the first occurrence of a character or substring?

  1. indexOf()
  2. lastIndexOf()
  3. compareTo()
  4. none of these
Question 17 Multiple Choice (Single Answer)

Which of the following applications of Java consists of text files that combines standard HTML and new scripting tags?

  1. Servlets
  2. JavaServer Pages (JSP)
  3. JavaBeans
  4. None of these
Question 18 Multiple Choice (Single Answer)

Which of the following methods is used to preallocate room for a certain number of characters after a StringBuffer has been constructed?

  1. setLength()
  2. charAt()
  3. ensureCapacity()
  4. none of these
Question 19 Multiple Choice (Single Answer)

Which of the following components of an Event is an object that generates an event?

  1. Event handler
  2. Event class
  3. Event source
  4. None of these
Question 20 Multiple Choice (Single Answer)

The events like BLOCK_DECREMENT, BLOCK_INCREMENT belong to which of the following classes in Java?

  1. ComponentEvent class
  2. AdjustmentEvent
  3. ActionEvent class
  4. ItemEvent class
Question 21 Multiple Choice (Single Answer)

Which of the following Java tools provides a database programming interface for Java programs?

  1. Appletviewer
  2. ODBC
  3. JDBC
  4. None of these
Question 22 Multiple Choice (Single Answer)

Which of the following methods in Random Access Files return the current location of the file pointer?

  1. seek()
  2. getFilePointer()
  3. length()
  4. none of these
Question 23 Multiple Choice (Single Answer)

Which of the following classes in Java implements the corresponding listener interfaces containing more than one method?

  1. WindowEvent class
  2. MouseEvent class
  3. Adapter class
  4. None of these