0

C and Java Programming

Description: D.S
Number of Questions: 25
Created by:
Tags: D.S Data Structures Data Communication & Networks OOPs Programming
Attempted 0/25 Correct 0 Score 0

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


Correct Option: C
Explanation:

This non-linear data structure is having a hierarchical relationship among its elements called nodes.

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

  1. Array

  2. Union

  3. Structure

  4. Tokens


Correct Option: C
Explanation:

Structure is a collection of logically related variables referenced under one name.

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

  1. string.h

  2. math.h

  3. ctype.h

  4. conio.h


Correct Option: C
Explanation:

The function 'isdigit()' belongs to ctype.h function as it is the character type function used to check whether input data is digit or not.

Which of the following categories of unshielded twisted pair cable supports data transmission upto 1000 Mbps?

  1. CAT1

  2. CAT3

  3. CAT5

  4. None of these


Correct Option: C
Explanation:

This type of unshielded twisted pair cable supports data transmission upto 1000 Mbps.

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


Correct Option: B
Explanation:

This method of passing arguments to a function passes the copy of the arguments to the called function.

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


Correct Option: C
Explanation:

This is the property of OOP that decomposes a system into a set of cohesive and loosely coupled modules.

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


Correct Option: C
Explanation:

This expression is one where operators are placed after the operands and it is also called as reverse polish notation.

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


Correct Option: A
Explanation:

Object is a basic run-time entity having some characteristics and behaviour.

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


Correct Option: D
Explanation:

This event object is generated when the text of a text component is modified.

Which of the following is a client/server software program that allows multiple users to communicate online with real-time audio, video and text chat in dynamic 3D environments?

  1. Server

  2. Network Interface Unit

  3. Crosstalk

  4. Interspace


Correct Option: D
Explanation:

This is a client/server software program that allows multiple users to communicate online with real-time audio, video and text chat in dynamic 3D environments.

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


Correct Option: B
Explanation:

The paint() method in Java is used in applet programming to draw the graphics of the applet in the drawing area.

___________ 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


Correct Option: B
Explanation:

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

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


Correct Option: B
Explanation:

This sort technique compares two adjoining values and exchange them if they are not in proper order.

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


Correct Option: C
Explanation:

These are the user interfaces for Applets that defines how the components will be arranged in a container.

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


Correct Option: C
Explanation:

This method is used to revert the characters within a StringBuffer object.

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

  1. Friend Function

  2. Inline Function

  3. Default Constructor

  4. Constructor


Correct Option: C
Explanation:

This is a special function in C++ that takes no arguments.

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


Correct Option: C
Explanation:

This tool is used when you want to document the java source file with proper comment entries.

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


Correct Option: A
Explanation:

This method of String class searches for the first occurrence of a character or substring.

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


Correct Option: B
Explanation:

This application of Java consists of text files that combine standard HTML and new scripting tags.

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


Correct Option: C
Explanation:

This method is used to preallocate room for a certain number of characters after a StringBuffer has been constructed.

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


Correct Option: C
Explanation:

This is a component of event class that generates an event.

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


Correct Option: B
Explanation:

This class is generated by a scroll bar and the events BLOCK_DECREMENT and BLOCK_INCREMENT belong to the same class used to decrease or increase value of a scroll bar.

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

  1. Appletviewer

  2. ODBC

  3. JDBC

  4. None of these


Correct Option: C
Explanation:

This is a Java tool that provides a database programming interface for Java programs.

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


Correct Option: B
Explanation:

This method in Random Access Files return the current location of the file pointer.

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


Correct Option: C
Explanation:

In Java, this class implements the corresponding listener interfaces containing more than one method.

- Hide questions