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

 

Texas Placement Paper -: DATA STRUCTURES Questions And Answers


Advertisements
Advertisements




Texas Previous Years Solved Sample Placement Papers

  1. If a 5-stage pipeline is flushed and then we have to execute 5 and 12 instructions respectively, then the number of cycles will be:

    A. 5 and 12

    B. 6 and 13

    C. 9 and 16 Answer: Option C

    D. None

  2. Solution: A 5-stage pipeline requires initial stages to be flushed before execution, so for 5 and 12 instructions, 4 cycles are added initially, resulting in 9 and 16 cycles respectively.
  3. K-map:
            AB
            ------
            C 1 X 0 0
              1 X 0 X
            
    Solve it:

    A. A.B

    B. ~A

    C. ~B

    D. A+B Answer: Option A

  4. Solution: From the K-map, the minimal expression is A.B.
  5. CHAR A[10][15] AND INT B[10][15] are defined. What's the address of A[3][4] and B[3][4] if the address of A is 0x1000 and B is 0x2000?

    A. 0x1030 and 0x20C3

    B. 0x1031 and 0x20C4 Answer: Option B

  6. Solution: Calculation is based on the sizes of CHAR (1 byte) and INT (4 bytes) along with the indices.
  7.         int f(int *a) {
                int b = 5;
                a = &b;
            }
            main() {
                int i;
                printf("\n %d", i);
                f(&i);
                printf("\n %d", i);
            }
            
    What's the output?

    A. 10, 5

    B. 10, 10

    C. 5, 5

    D. None Answer: Option D

  8. Solution: Variable `i` is uninitialized, and assigning `a` in `f()` doesn't affect the original `i`.
  9.         main() {
                int i;
                fork();
                fork();
                fork();
                printf("----");
            }
            
    How many times is the `printf` executed?

    A. 3

    B. 6

    C. 5

    D. 8 Answer: Option D

  10. Solution: Each `fork()` creates a new process, resulting in 2^3 = 8 processes executing the `printf`.
  11.         void f(int i) {
                int j;
                for (j = 0; j < 16; j++) {
                    if (i & (0x8000 >> j))
                        printf("1");
                    else
                        printf("0");
                }
            }
            
    What's the purpose of the program?

    A. Its output is the hex representation of i

    B. BCD

    C. Binary Answer: Option C

    D. Decimal

  12. Solution: The program prints the binary representation of the integer `i`.
  13.         #define f(a,b) a+b
            #define g(a,b) a*b
            main() {
                int m;
                m = 2 * f(3, g(4, 5));
                printf("\n m is %d", m);
            }
            
    What's the value of m?

    A. 70

    B. 50

    C. 26

    D. 69 Answer: Option D

  14. Solution: Macro expansion results in `2 * (3 + (4 * 5)) = 69`.
  15.         main() {
                char a[10];
                strcpy(a, "\0");
                if (a == NULL)
                    printf("\a is null");
                else
                    printf("\n a is not null");
            }
            
    What happens with it?

    A. Compile-time error

    B. Run-time error

    C. a is null

    D. a is not null Answer: Option D

  16. Solution: `a` is not a null pointer; it points to a valid memory location even if it's empty.
  17. `char a[5] = "hello";`

    A. In array, we can't do the operation

    B. Size of a is too large

    C. Size of a is too small Answer: Option C

    D. Nothing wrong with it

  18. Solution: The size of the array is insufficient to hold the string along with the null terminator.
  19. Local variables can be stored by the compiler:

    A. In register or heap

    B. In register or stack Answer: Option B

    C. In stack or heap

    D. Global memory

  20. Solution: Local variables are stored in registers or the stack, depending on their usage.
  21. Average and worst time complexity in a sorted binary tree is:

    A. O(log n) and O(n)

    B. O(n) and O(n) Answer: Option A

  22. Solution: For balanced trees, average complexity is O(log n), while for unbalanced trees, it can degrade to O(n).
  23. Convert 40.xxxx into binary:

    A. 101000.xxxx Answer: Option A

  24. Global variable conflicts due to multiple file occurrence are resolved during:

    A. Compile-time

    B. Run-time

    C. Link-time Answer: Option C

    D. Load-time

  25. Two programs are given for factorial, one with recursion and one without. Which program won't run for very big numbers due to stack overflow?

    A. i only Answer: Option A

    B. ii only

    C. i & ii both

    D. None




 


.

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