.
  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 » Mascot Placement Papers » Mascot Previous Year Placement Paper

 

Mascot Placement Paper -: Programming Questions And Answers


Advertisements
Advertisements




Mascot Previous Years Solved Sample Placement Papers

  1. The postfix form of the expression (A+ B)*(C*D- E)*F / G is?

    a) AB+ CD*E – FG /**

    b) AB + CD* E – F **G /

    c) AB + CD* E – *F *G /

    d) AB + CDE * – * F *G /

    Answer: c

    Explanation: (((A+ B)*(C*D- E)*F) / G) is converted to postfix expression as (AB+(*(C*D- E)*F )/ G) (AB+CD*E-*F) / G (AB+CD*E-*F * G/). Thus Postfix expression is AB+CD*E-*F*G/

  2. The data structure required to check whether an expression contains a balanced parenthesis is?

    a) Stack

    b) Queue

    c) Array

    d) Tree

    Answer: a

    Explanation: The stack is a simple data structure in which elements are added and removed based on the LIFO principle. Open parenthesis is pushed into the stack and a closed parenthesis pops out elements till the top element of the stack is its corresponding open parenthesis. If the stack is empty, parenthesis is balanced otherwise it is unbalanced.

  3. What data structure would you mostly likely see in non recursive implementation of a recursive algorithm?

    a) Linked List

    b) Stack

    c) Queue

    d) Tree

    Answer: b

    Explanation: In recursive algorithms, the order in which the recursive process comes back is the reverse of the order in which it goes forward during execution. The compiler uses the stack data structure to implement recursion. In the forwarding phase, the values of local variables, parameters and the return address are pushed into the stack at each recursion level. In the backing-out phase, the stacked address is popped and used to execute the rest of the code.

  4. The process of accessing data stored in a serial access memory is similar to manipulating data on a ________

    a) Heap

    b) Binary Tree

    c) Array

    d) Stack

    Answer: d

    Explanation: In serial access memory data records are stored one after the other in which they are created and are accessed sequentially. In stack data structure, elements are accessed sequentially. Stack data structure resembles the serial access memory.

  5. The postfix form of A*B+C/D is?

    a) *AB/CD+

    b) AB*CD/+

    c) A*BC+/D

    d) ABCD+/*

    Answer: b

    Explanation: Infix expression is (A*B)+(C/D) AB*+(C/D) AB*CD/+. Thus postfix expression is AB*CD/+.

  6. Which data structure is needed to convert infix notation to postfix notation?

    a) Branch

    b) Tree

    c) Queue

    d) Stack

    Answer: d

    Explanation: The Stack data structure is used to convert infix expression to postfix expression. The purpose of stack is to reverse the order of the operators in the expression. It also serves as a storage structure, as no operator can be printed until both of its operands have appeared.

  7. The prefix form of A-B/ (C * D ^ E) is?

    a) -/*^ACBDE

    b) -ABCD*^DE

    c) -A/B*C^DE

    d) -A/BC*^DE

    Answer: c

    Explanation: Infix Expression is (A-B)/(C*D^E) (-A/B)(C*D^E) -A/B*C^DE. Thus prefix expression is -A/B*C^DE.

  8. What would be the Prefix notation for the given equation? A+B*C^D

    a) +A*B^CD

    b) +A^B*CD

    c) *A+B^CD

    d) ^A*B+CD

    Answer: a

    Explanation: Reverse the equation or scan the equation from right to left. Apply the infix-prefix algorithm. The preference order in ascending order are as follows +*^. Operators are pushed into the stack and popped if its preference is greater than the one which is getting pushed. In the end all operators are popped. The equation evaluates to DC^B*A+. Reversing this we get our following answer.

  9. Out of the following operators (^, *, +, &, $), the one having highest priority is _________

    a) +

    b) $

    c) ^

    d) &

    Answer: c

    Explanation: According to the algorithm (infix-prefix), it follows that the exponentiation will have the highest priority.

  10. Out of the following operators (|, *, +, &, $), the one having lowest priority is ________

    a) +

    b) $

    c) |

    d) &

    Answer: c

    Explanation: According to the algorithm (infix-prefix), it follows that the logical OR will have the lowest priority.

  11. What would be the Prefix notation for the given equation? A^B^C^D

    a) ^^^ABCD

    b) ^A^B^CD

    c) ABCD^^^

    d) AB^C^D

    Answer: a

    Explanation: Reverse the equation or scan the equation from right to left. Apply the infix-prefix algorithm. Here we have to remember that the exponentiation has order of associativity from right to left. Therefore the stack goes on pushing ^. Therefore resulting in ^^^ABCD.

  12. What would be the Prefix notation for the given equation? a+b-c/d&e|f

    a) |&-+ab/cdef

    b) &|-+ab/cdef

    c) |&-ab+/cdef

    d) |&-+/abcdef

    Answer: a

    Explanation: Reverse the equation or scan the equation from right to left. Apply the infix-prefix algorithm. The preference order in ascending order are as follows |&+*/.




 


.

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