.
  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. Which of the following is the correct class of the object cout?

    A: iostream

    B: istream

    C: ostream

    D: ifstream

    Ans: C
  2. Which of the following cannot be used with the keyword virtual?

    A: class

    B: member functions

    C: constructor

    D: destructor

    Ans: C
  3. Which of the following problem causes an exception?

    A: Missing semicolon in statement in main().

    B: A problem in calling function

    C: A syntax error

    D: A run-time error

    Ans: D
  4. Which one of the following options is correct about the statement given below? The compiler checks the type of reference in the object and not the type of object.

    A: Inheritance

    B: Polymorphism

    C: Abstraction

    D: Encapsulation

    Ans: B
  5. What will be the output of the following program?

    #include <iostream.h>
    void main()
    {
      float x;
      x = (float)9/2;
      cout << x;
    }
        

    A: 4.5

    B: 4.0

    C: 4

    D: 5

    Ans: A
  6. The term __________ means the ability to take many forms.

    A: Inheritance

    B: Polymorphism

    C: Member function

    D: Encapsulation

    Ans: B
  7. What is the result of the following operation? Top (Push (S, X))

    a) X

    b) X+S

    c) S

    d) XS

    Answer: a

    Explanation: The function Push(S,X) pushes the value X in the stack S. Top() function gives the value which entered last. X entered into stack S at last.

  8. The prefix form of an infix expression (p + q) – (r * t) is?

    a) + pq – *rt

    b) – +pqr * t

    c) – +pq * rt

    d) – + * pqrt

    Answer: c

    Explanation: Given Infix Expression is ((p+q)-(r*t)) (+pq)-(r*t) (-+pq)(r*t) -+pq*rt. Thus prefix expression is -+pq*rt.

  9. Which data structure is used for implementing recursion?

    a) Queue

    b) Stack

    c) Array

    d) List

    Answer: b

    Explanation: Stacks are used for the implementation of Recursion.

  10. What data structure is used when converting an infix notation to prefix notation?

    a) Stack

    b) Queue

    c) B-Trees

    d) Linked-list

    Answer: a

    Explanation: First you reverse the given equation and carry out the algorithm of infix to postfix expression. Here, the data structure used is stacks.

  11. What would be the Prefix notation for the given equation? A+(B*C)

    a) +A*CB

    b) *B+AC

    c) +A*BC

    d) *A+CB

    Answer: c

    Explanation: Reverse the equation or scan the equation from right to left. Apply the infix-postfix algorithm. The equation inside the bracket evaluates to CB* and outside the bracket evaluates to A+ therefore getting CB*A+. Reversing this and we get +A*BC.

  12. What would be the Prefix notation for the given equation? (A*B)+(C*D)

    a) +*AB*CD

    b) *+AB*CD

    c) **AB+CD

    d) +*BA*CD

    Answer: a

    Explanation: Reverse the equation or scan the equation from right to left. Apply the infix-postfix algorithm. The equation inside the brackets evaluate to DC* and BA* respectively giving us DC*BA*+ in the end. Reversing this we get the +*AB*CD.

  13. What would be the Prefix notation for the given equation? (a+(b/c)*(d^e)-f)

    a) -+a*/^bcdef

    b) -+a*/bc^def

    c) -+a*b/c^def

    d) -a+*/bc^def

    Answer: b

    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 +*/^. Brackets have the highest priority. The equations inside the brackets are solved first.

  14. What would be the Prefix notation and Postfix notation for the given equation? A+B+C

    a) ++ABC and AB+C+

    b) AB+C+ and ++ABC

    c) ABC++ and AB+C+

    d) ABC+ and ABC+

    Answer: a

    Explanation: For prefix notation there is a need of reversing the giving equation and solving it as a normal infix-postfix question. We see that it doesn’t result as same as normal infix-postfix conversion.

  15. What would be the Prefix notation for the given equation? a|b&c

    a) a|&bc

    b) &|abc

    c) |a&bc

    d) ab&|c

    Answer: c

    Explanation: The order of preference of operators is as follows (descending): & |. The equation a|b&c will be parenthesized as (a|(b&c)) for evaluation.




 


.

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