VERITAS PLACEMENT PAPER (TECHNICAL- C C++)

 

 

1. What is the output of the following operation?

 

       0x7e00e9 % 0x7

 

2. What does a sticky bit do and why?

 

3. Question is how many processes are created when this program is run

 

int main()

{

forkthem(5);

}

 

void forkthem(int n)

{

if (n>0)

{

fork();

forkthem(n-1);

}

else return;

}

 

4. preorder and inorder was given, asked which of the options was post order

 

5. Which of the following representations do not need braces or parenthesis - prefix, postfix & infix;

 

6. Give the grammar - E -> EE | E+E | n, is it ambiguous? left recursive? none?

 

7. given the following code in two threads, what will be the range of possible values of n?

 

First Thread

sum = 0;

for(i = 1;i<5;i++)

{

sum++;

}

 

Secdond thread

sum = 0;

for(j=1;j<5;j++)

{

sum++;

}

 

8. The regex in Boerne shell to find all files except those starting with  and  The choices involved a lot of [!.] based regexes.

 

9. One question on

- true hits & true misses

- conflict misses

- cache line ping pong

on a SMP 2 processor machine.

 

10. You are logged in on a system. Somebody mounts a file system on home.

 

a) Would you remain logged in?

b) You logout and you login back again. Would you be able to do that?

 

11. Some question on sorting algorithms ? which of the following algorithms is least dependent on the original ordering of the numbers: Bubble, insertion, merge & quick sort

 

12. Why recursion not possible in Fortran?

a) No Stack structure

b) No Dynamic Allocation etc etc

 

13. Some CFG is given and asked to choose the string accepted by this grammar.

 

14. So far that's what we have recollected...

 

15.The following program aims to check whether "a" is a power of 2.

 

int power2(int a)

{

int b;

b = _____;

if ((a^b)>>1 == b) return 1;

else return 0;

}

 

16. Following is used to find if a 32-bit number is divisible by 3

 

int div3(int n)

{

int i;

int sum = 0;

for(i = 0;i<32;i++)

{

if(i & 1)

sum += n&i;

else

sum -= n&i;

n>>=1;

}

 

if(sum == 0) return sum;

if(sum <0) sum = -sum; changed.

if(sum <3) return sum;

 

return ______;

}

 

 

17. Following is used for mutual exclusion:

 

Part A

 

 

while(1)

{

while(________);

if (!test_and_set(lock)) break;

}

 

Part B

 

 

A program is given, and to say what it prints:

 

char p = "char p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}

 

Part C

 

 

main()

{

printf("%d",f(8));

}

 

int f(int i)

{

return ((--i>1)? f(i) - f(i-1):0);

}

 

 

17. Find whether the following programs have any compilation errors?

 

Part A

 

#define SRP1 struct record

typedef struct record SRP2;

 

SRP1 p1, p2;

SRP2 p3, p4;

 

swap()

{

SRP2 temp1, temp2;

temp1 = p1;

p1 = p3;

p3 = temp1;

temp2 = p2;

p2 = p4;

p4 = temp2;

}

 

Part B

 

#define EIGHT 08

 

main()

{

int nine;

char string="abcdefgh"

nine= EIGHT;

printf("%d",string[nine]);

}

 

Veritas Paper At IITK

 

 

Written Test

The written test consists of two sections each of 45 minutes duration

 

Section 1

This is the aptitude section consisting of 45 questions to be attempted in 45 minutes. As is in all the exams, this section is based on the MBA pattern of examination.

 

Section 2

This is the technical section. There is a separate paper for hardware and software. Candidates have to mention beforehand whether they want to write the software or the hardware paper.This section also carries 45 questions to be completed in 45 minutes.

 

Interview

 

There are two rounds of interviews, viz., the technical and and the HR round

 

Technical and Personal Round for Software Candidates

 

Mainly subjective questions in C, Operating Systems, DBMS, Data Structures are asked interspersed with some on the candidate s personal background.

 

.Typical questions in C and Data Structures

 

1. WAP to interchange 2 variables without using the third one

 

2. Explain quick sort and merge sort algorithms amn derive the time-constraint relation for these.

 

3. Explain binary searching, fibonacci search

 

4. General questions on binary trees, transversals

 

5. General questions on graphs and their representation.

 

Typical Questions on Operating Systems

 

1. Demand paging, page faults, replacement algos, thrashing, etc

 

2. Paged segmentation and segment paging :

 

In this section, case studies are presented are presented before the candidate to percieve his reaction and his/her communication skills are tested. IBM expects teamwork and teamspirit from the candidates and their answers should reflect this attitude

 

Typical question is

 

You are a project manager of a big multinational project. There is a person X, assigned to you who has the best technical skills required for the project, even better than you. But he wishes to be the project manager ,which the management does not permit, due to which he threatens to quit. All others in the group are not as competent. Talk yourself out of this situation pretending that the interviewer is the disgruntled employee and explain the necessary action.

 Click to dowload more papers