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

 

Kshema Placement Paper -: Data Structure Questions And Answers


Advertisements
Advertisements




Kshema Previous Years Solved Sample Placement Papers

  1. When an operand is read, which of the following is done?

    a) It is placed on to the output

    b) It is placed in operator stack

    c) It is ignored

    d) Operator stack is emptied

    Answer: a

    Explanation: While converting an infix expression to a postfix expression, when an operand is read, it is placed on to the output. When an operator is read, it is placed in the operator stack.

  2. What should be done when a left parenthesis ‘(‘ is encountered?

    a) It is ignored

    b) It is placed in the output

    c) It is placed in the operator stack

    d) The contents of the operator stack is emptied

    Answer: c

    Explanation: When a left parenthesis is encountered, it is placed on to the operator stack. When the corresponding right parenthesis is encountered, the stack is popped until the left parenthesis and remove both the parenthesis.

  3. Which of the following is an infix expression?

    a) (a+b)*(c+d)

    b) ab+c*

    c) +ab

    d) abc+*

    Answer: a

    Explanation: (a+b)*(c+d) is an infix expression. +ab is a prefix expression and ab+c* is a postfix expression.

  4. What is the time complexity of an infix to postfix conversion algorithm?

    a) O(N log N)

    b) O(N)

    c) O(N²)

    d) O(M log N)

    Answer: b

    Explanation: The time complexity of an infix to postfix expression conversion algorithm is mathematically found to be O(N).

  5. What is the postfix expression for the corresponding infix expression?

    a+b*c+(d*e)

    a) abc*+de*+

    b) abc+*de*+

    c) a+bc*de+*

    d) abc*+(de)*+

    Answer: a

    Explanation: Using the infix to postfix expression conversion algorithm, the corresponding postfix expression is found to be abc*+de*+.

  6. Parentheses are simply ignored in the conversion of infix to postfix expression.

    a) True

    b) False

    Answer: b

    Explanation: When a parenthesis is encountered, it is placed on the operator stack. When the corresponding parenthesis is encountered, the stack is popped until the other parenthesis is reached and they are discarded.

  7. It is easier for a computer to process a postfix expression than an infix expression.

    a) True

    b) False

    Answer: a

    Explanation: Computers can easily process a postfix expression because a postfix expression keeps track of precedence of operators.

  8. What is the postfix expression for the infix expression?

    a-b-c

    a) -ab-c

    b) ab – c –

    c) – -abc

    d) -ab-c

    Answer: b

    Explanation: The corresponding postfix expression for the given infix expression is found to be ab-c- and not abc- -.

  9. 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: To convert infix to prefix, reverse the equation and use the infix-to-postfix algorithm. This process utilizes stacks for operator precedence and association.

  10. What will the following program do?
    void main()
    {
        int i;
        char a[] = "String";
        char *p = "New String";
        char *Temp;
        Temp = a;
        a = malloc(strlen(p) + 1);
        strcpy(a, p); // Line number: 9
        p = malloc(strlen(Temp) + 1);
        strcpy(p, Temp);
        printf("(%s, %s)", a, p);
        free(p);
        free(a);
    } // Line number 15
            

    (a) Swap contents of p & a and print: (New string, string)

    (b) Generate compilation error in line number 8 (Ans)

    (c) Generate compilation error in line number 5

    (d) Generate compilation error in line number 7

    (e) Generate compilation error in line number 1

  11. In the following code segment, what will be the result of the function?
    Value of x , value of y
    {
        unsigned int x = -1;
        int y;
        y = ~0;
        if(x == y)
            printf("same");
        else
            printf("not same");
    }
            

    (a) same, MAXINT, -1 (Ans)

    (b) not same, MAXINT, -MAXINT

    (c) same, MAXUNIT, -1

    (d) same, MAXUNIT, MAXUNIT

    (e) not same, MAXINT, MAXUNIT

  12. What will be the result of the following program?
    char *gxxx()
    {
        static char xxx[1024];
        return xxx;
    }
    
    main()
    {
        char *g = "string";
        strcpy(gxxx(), g);
        g = gxxx();
        strcpy(g, "oldstring");
        printf("The string is : %s", gxxx());
    }
            

    (a) The string is : string

    (b) The string is : Oldstring (Ans)

    (c) Run time error/Core dump

    (d) Syntax error during compilation

    (e) None of these




 


.

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-2025 Vyom Technosoft Pvt. Ltd., All Rights Reserved. Read our Privacy Policy