.
  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 » Deloitte Written Test Papers » Deloitte Coding and Logical Questions

 

Deloitte Placement Paper - Code and Logical Questions with Answers


Advertisements
Advertisements



Previous Years Solved Sample Placement Papers

  1. What is the output in the following program?
    main() {
        char c = -64;
        int i = -32;
        unsigned int u = -16;
        if (c > i) {
            printf("pass1,");
            if (c)
                printf("pass2");
            else
                printf("Fail2");
        } else
            printf("Fail1");
        if (i)
            printf("pass2");
        else
            printf("Fail2");
    }
          
    (A) Pass1,Pass2
    (B) Pass1,Fail2
    (C) Fail1,Pass2
    (D) Fail1,Fail2
    (E) None of these
    Ans: C

  2. In the process table entry for the kernel process, the process ID value is:
    (A) 0
    (B) 1
    (C) 2
    (D) 255
    (E) It does not have a process table entry
    Ans: A

  3. Which of the following API is used to hide a window?
    (A) ShowWindow
    (B) EnableWindow
    (C) MoveWindow
    (D) SetWindowPlacement
    (E) None of the above
    Ans: A

  4. 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
    (C) Generate compilation error in line number 5
    (D) Generate compilation error in line number 7
    (E) Generate compilation error in line number 1
    Ans: B

  5. 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
    (B) not same, MAXINT, -MAXINT
    (C) same, MAXUINT, -1
    (D) same, MAXUINT, MAXUINT
    (E) not same, MAXINT, MAXUINT
    Ans: A

  6. PATH = /bin:/usr:/yourhome
    The file /bin/calendar has the following line:
    cal 10 1997
    The file /yourhome/calendar has the following line:
    cal 5 1997
    If the current directory is /yourhome and "calendar" is executed:
    (A) The calendar for May 1997 will be printed on the screen
    (B) The calendar for Oct 1997 will be printed on the screen
    (C) The calendar for the current month (whatever it is) will be printed
    (D) Nothing will get printed on the screen
    (E) An error message will be printed
    Ans: B




 


.

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