.
  Vyom World.com . Let's Touch the Sky Together!  
.

Home
VyomWorld.com Home
Interview Questions
VyomLinks.com Home
JobsAssist.com Home
Vyom Network
Contact Us
Jobs & Careers
Resume Submitter
Placement Papers
IT Companies Directory
Computer Jobs
Interview Questions
Online Exams
Vyom Career eMag.
Fun
Send FREE SMS!
SMS Jokes
Source Codes Library
Source Codes Home
ASP Source Codes
C Source Codes
C++ Source Codes
COBOL Source Codes
Java Source Codes
Pascal Source Codes
Submit Source Codes
GATE
GATE an Overview
GATE Preparation
Study Materal
GRE
GRE an Overview
GRE Questions
GRE Preparation
GRE Universities
TOEFL Preparation
TOEFL Resources
GMAT Preparation
GMAT Resources
MBA Preparation
MBA Resources
Networking Concepts
Networking Concepts
Testing Preparation
Testing Resources
Webmasters
Free Traffic Builder
Webmaster Articles
Web Hosting
Tutorials
Hardware Tutorial
1500 Free eBooks New!


Home » Placement Papers » Dharma Placement Papers » Dharma Previous Year Placement Paper

 

Dharma Placement Paper - Data Structure Questions And Answers


Advertisements
Advertisements




Dharma Previous Years Solved Sample Placement Papers

  1. Process of inserting an element in stack is called ____________

    a) Create

    b) Push

    c) Evaluation

    d) Pop

    Answer: b

    Explanation: Push operation allows users to insert elements in the stack. If the stack is filled completely and trying to perform push operation stack – overflow can happen.

  2. Process of removing an element from stack is called __________

    a) Create

    b) Push

    c) Evaluation

    d) Pop

    Answer: d

    Explanation: Elements in the stack are removed using pop operation. Pop operation removes the topmost element in the stack i.e. last entered element.

  3. In a stack, if a user tries to remove an element from an empty stack it is called _________

    a) Underflow

    b) Empty collection

    c) Overflow

    d) Garbage Collection

    Answer: a

    Explanation: Underflow occurs when the user performs a pop operation on an empty stack. Overflow occurs when the stack is full and the user performs a push operation. Garbage Collection is used to recover the memory occupied by objects that are no longer used.

  4. Pushing an element into stack already having five elements and stack size of 5, then stack becomes ___________

    a) Overflow

    b) Crash

    c) Underflow

    d) User flow

    Answer: a

    Explanation: The stack is filled with 5 elements and pushing one more element causes a stack overflow. This results in overwriting memory, code and loss of unsaved work on the computer.

  5. Entries in a stack are “ordered”. What is the meaning of this statement?

    a) A collection of stacks is sortable

    b) Stack entries may be compared with the ‘<‘ operation

    c) The entries are stored in a linked list

    d) There is a Sequential entry that is one by one

    Answer: d

    Explanation: In stack data structure, elements are added one by one using push operation. Stack follows LIFO Principle i.e. Last In First Out(LIFO).

  6. Which of the following is not the application of stack?

    a) A parentheses balancing program

    b) Tracking of local variables at run time

    c) Compiler Syntax Analyzer

    d) Data Transfer between two asynchronous process

    Answer: d

    Explanation: Data transfer between the two asynchronous processes uses the queue data structure for synchronization. The rest are all stack applications.

  7. Consider the usual algorithm for determining whether a sequence of parentheses is balanced. The maximum number of parentheses that appear on the stack AT ANY ONE TIME when the algorithm analyzes: (()(())(()))?

    a) 1

    b) 2

    c) 3

    d) 4 or more

    Answer: c

    Explanation: In the entire parenthesis balancing method when the incoming token is a left parenthesis it is pushed into stack. A right parenthesis makes pop operation to delete the elements in stack till we get left parenthesis as topmost element. 3 elements are there in stack before right parentheses comes. Therefore, maximum number of elements in stack at run time is 3.

  8. Consider the usual algorithm for determining whether a sequence of parentheses is balanced. Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 right parentheses (in some order). The maximum number of parentheses that appear on the stack AT ANY ONE TIME during the computation?

    a) 1

    b) 2

    c) 3

    d) 4 or more

    Answer: b

    Explanation: In the entire parenthesis balancing method when the incoming token is a left parenthesis it is pushed into stack. A right parenthesis makes pop operation to delete the elements in stack till we get left parenthesis as topmost element. 2 elements are there before right parenthesis which is the maximum number of elements in stack at run time.

  9. What is the value of the postfix expression 6 3 2 4 + – *?

    a) 1

    b) 40

    c) 74

    d) -18

    Answer: d




 


.

Recently Updated: New Placement Papers added.
Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Programming & Source Codes | GRE Preparation | Jobs, Discussions | Software Listing | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | International Business Information | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | FAQs | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Excellent Mobiles | Software Testing | Interview Questions | Freshers Jobs | Server Insiders | File Extension Directory

Copyright ©2003-2024 Vyom Technosoft Pvt. Ltd., All Rights Reserved. Read our Privacy Policy