D E Shaw & Company : Profile

Sample Paper
Interview
Profile of the company

 Written Test
The paper is technical based - with a major emphasis on C.At the moment we are providing you with a few questions so that you have an idea of the paper and know what to expect.
Click here to see the sample test.

 Interview
The interview is based mainly on C. The panel may ask you to solve some new questions in front of them. Your C fundamentals should be very strong and expect some real tough stuff from the panel.

 Profile
In July 1988, a small investment partnership called D. E. Shaw & Co., L.P. was organized with an initial capitalization of US $28 million and an ambitious plan for the application of quantitative and computational techniques to various aspects of the securities business. Today, the D. E. Shaw group of companies has approximately $1.2 billion in aggregate capital, and has earned an international reputation for financial innovation and technological leadership.
For the first several years of its existence, D. E. Shaw & Co. used its technical expertise solely to trade for its own account, establishing a quiet reputation within the quantitative financial community while remaining nearly invisible to the world at large. In 1992, however, the firm made a strategic decision to expand its focus and presence, launching a new business unit to apply quantitative and computational techniques in support of the provision of financial services to outside customers. A third line of activity was added in 1994, when the company began to fund (and, in some cases, organize) early- and intermediate-stage technology-oriented business ventures.
The firm was founded in 1988 by David E. Shaw, who continues to serve as chairman and chief executive officer of D. E. Shaw & Co., Inc. The author of 63 scholarly publications, Dr. Shaw received his Ph.D. from Stanford University in 1980 and served on the faculty of the Department of Computer Science at Columbia University before joining Morgan Stanley & Co. in 1986 as its vice president in charge of automated analytical trading technology. Earlier, he founded and served as president and CEO of Stanford Systems Corporation, a computer systems firm based in California's Silicon Valley.
The Indian arm of the company is based in Hyderabad. The company's pay package is comparable to the best in the industry.
For more information about this company visit their homesite at http://www.deshaw.com/


D E Shaw & Company Sample Paper

SECTION-A

Write the programs for the following problems in C.

1. Swap two variables x,y without using a temporary variable.

2. Write algorithm for finding the GCD of a number.

3.Write a program for reversing the given string.

4. The integers from 1 to n are stored in an array in a random
fashion. but one integer is missing. Write a program to find the
missing integer.
Ans). Hint : The sum of n natural numbers is = n(n+1)/2.
if we subtract the above sum from the sum of all the
numbers in the array , the result is nothing but the
missing number.

5. Some bit type of questions has been given on pointers asking to
to find whether it is correct from syntax point of view. and if
it is correct explain what it will do. (around 15 bits).

SECTION-B


6. For the following C program
#define AND &&
#define ARRANGE (a>25 AND a<50) a =" 30;" r1="6.25,r2=" a="AREA(r1);" a="AREA(r2);" d="5;" i="1;i<4,i++)" s="\12345s\n" i="1;" k=" -1"> k=255; */
signed j=-1; /* char k= -1 => k=65535 */
/* unsigned or signed int k= -1 =>k=65535 */
if(ij)
printf("greater");
else
if(i==j)
printf("equal");
}
Ans: less

5.
void main()
{
float j;
j=1000*1000;
printf("%f",j);
}

1. 1000000
2. Overflow
3. Error
4. None
Ans: 4

6. How do you declare an array of N pointers to functions returning
pointers to functions returning pointers to characters?

Ans: The first part of this question can be answered in at least
three ways:

1. char *(*(*a[N])())();

2. Build the declaration up incrementally, using typedefs:

typedef char *pc; /* pointer to char */
typedef pc fpc(); /* function returning pointer to char */
typedef fpc *pfpc; /* pointer to above */
typedef pfpc fpfpc(); /* function returning... */
typedef fpfpc *pfpfpc; /* pointer to... */
pfpfpc a[N]; /* array of... */

3. Use the cdecl program, which turns English into C and vice
versa:

cdecl> declare a as array of pointer to function returning
pointer to function returning pointer to char
char *(*(*a[])())()

cdecl can also explain complicated declarations, help with
casts, and indicate which set of parentheses the arguments
go in (for complicated function definitions, like the one
above).
Any good book on C should explain how to read these complicated
C declarations "inside out" to understand them ("declaration
mimics use").
The pointer-to-function declarations in the examples above have
not included parameter type information. When the parameters
have complicated types, declarations can *really* get messy.
(Modern versions of cdecl can help here, too.)


7. A structure pointer is defined of the type time . With 3 fields min,sec hours having pointers to intergers.
Write the way to initialize the 2nd element to 10.

8. In the above question an array of pointers is declared.
Write the statement to initialize the 3rd element of the 2 element to 10;

9.
int f()
void main()
{
f(1);
f(1,2);
f(1,2,3);
}
f(int i,int j,int k)
{
printf("%d %d %d",i,j,k);
}

What are the number of syntax errors in the above?

Ans: None.

10.
void main()
{
int i=7;
printf("%d",i++*i++);
}

Ans: 56

11.
#define one 0
#ifdef one
printf("one is defined ");
#ifndef one
printf("one is not defined ");

Ans: "one is defined"


12.
void main()
{
int count=10,*temp,sum=0;
temp=&count;
*temp=20;
temp=∑
*temp=count;
printf("%d %d %d ",count,*temp,sum);
}

Ans: 20 20 20


13. There was question in c working only on unix machine with pattern matching.


14. what is alloca()
Ans : It allocates and frees memory after use/after getting out of scope

15.
main()
{
static i=3;
printf("%d",i--);
return i>0 ? main():0;
}

Ans: 321

16.
char *foo()
{
char result[100]);
strcpy(result,"anything is good");
return(result);
}
void main()
{
char *j;
j=foo()
printf("%s",j);
}

Ans: anything is good.

17.
void main()
{
char *s[]={ "dharma","hewlett-packard","siemens","ibm"};
char **p;
p=s;
printf("%s",++*p);
printf("%s",*p++);
printf("%s",++*p);
}
Ans: "harma" (p->add(dharma) && (*p)->harma)
"harma" (after printing, p->add(hewlett-packard) &&(*p)->harma)
"ewlett-packard"
Geometrics Sample Paper

SECTION 1- APTITUDE SECTION
Directions for questions 1-3: Complete the sequence given below :
1. 5, 5, 13, 13, 21, 21, __

Ans: 29
2. 0, 7, 26, 63, 124, __

Ans: 215 ( hint: n3-1 )
3. 1, 3, 5, 7, __
Ans: 9

4. If a person walks at 4/5th of his usual speed he reaches 40min late. If he walks at his usual speed for how much time does he travel ?
5. Two trains A&B start at opposite points 120km apart at 60kmph. A fly starting along with train A at 120kmph reaches B then returns back to touch A and continues the two and fro movement. By the time two trains meet how much distance would the fly have traveled?
6. In a class 80% have passed in English, 70% passed Hindi, 10% didn't pass either. If 144 students passed both the subjects. What is the total strength of the class?

7. Find the least number which when divided by 7 gives the reminder 6, when divided by 6 gives reminder 5, when divided by 5 gives reminder 4 and so on ?

8. If a man stands in front of sun what is the first letter of the direction which is left to him ?

9. (a)A square is to circle as cube is to
(b)Success is to failure as joy is to

10. (a)Give the synonyms of the following words
(i) Joy
(ii) Inert
(iii) Jolly

(b) Give the opposites of the following words
(i) genuine
(ii) command
(iii) essential
11.Find the odd man out in the following sets
(i) Tiger, Elephant, King Cobra, Dolphin
(ii) Oasis, Lake, Pool, Valcano
(iii) Bengali, Karnataka, Mumbai, Kashmir
(iv) Lapidary, Lancet, Scapel, Surgeon
(v) Requiem, Dirge, Elegy, Paean
12. I bought a cycle 2days before my birthday and I broke it 3 days after my birthday. The day I broke it is Mar2,1956?

Directions: The following questions are to be answered on the basis of the above given statement
i) When is my birthday?
Hint: Keep in mind that 1956 was a leap year.
(ii) What is my age on Mar 4th, 1980?
(iii) My nephew is born exactly 20years after me. If I turned 20 in 1960, what is the nephews age on Feb 28th 1988 ?

13. Monday Aug25, 96 :
Hostess: "Mr A, you forgot your umbrella during the party on last friday. I expected you to collect it on your visit on wednesday as I plan to leave on this Friday."

Directions: The following questions are to be answered on the basis of the above given statement
(i) when A missed umbrella?
(ii)When A is supposed to collect it?
(iii)When K leaves?

14.What is my father's sons son to my son?

Ans. Cousin brother
15. On cutting a solid parabola what would be generated

Ans: Cone

16. What is Eulers formula?

Ans: F+V-E =2; where
F => faces; V => vertices; E => number of edges
17. What is Newton Raphson method used for?

Ans: To find the root of f(x) = 0;

18. How many tangents can be drawn on three circles if they don't lie within each other ?

19. xy - x + 2y = 6 equation is shifted to form equation xy=c what is c ?

20.When x is real what is the least value of (x2-6x+5)/(x2+2x+1)

21.When an object like cube or sphere is seen along x, y, z axis we get the same.Apart from these suggest another object which has similar characteristics as that mentioned above?
Ans: Triangular prism
22. When an object is seen from the front side we can see two concentric squares and top view also without any hidden lines. Draw the side view.
23. In common parlance, A=> B means what
Ans: if A is true B has to be true
23. If A is not invertible and BA = I is not possible, what is implied by this?
Ans: Determinant is Zero.
24. What is a free body diagram used for

25. A die is thrown twice what is the probability that you get same number


26. The sum of two numbers is 55. What is the larger number?


SECTION 2-TECHNICAL SECTION


1. Convert 251 in base 10 to octal(base 8)?

2. How much information can be stored in 1 byte of a IBM pc compatible?

3.What is the language used for Artificial Intelligence
Ans: lisp

4. Swap two variables without using temporary variable
Ans: a= a+b; b= a-b; a= a-b:
5.Which is not the operating system ?
Ans: BIOS

6. What is the optimum number of operations for 2x3 + 3x2 + 5x + 5?

7. In the fortran language which of the following is true.
(i) fortran uses call by value
(ii) fortran is object oriented
(iii) fortran allows use of function overloading

Ans. (i)
8. When a program is compiled what does it produce?
Ans: Source code is converted to object code

9. What is the difference between function overloading and function overriding?

10. What is the character set used in JAVA 2.0 ?
Ans: Unicode

SECTION 3 - C TEST
1. What is the mistake in the following program segment ?

f()
{
int a;
void c;
f2(&c,&a);}

2. a=0;
b=(a=0)?2:3;

a) What will be the value of b and why ?
b) If in first statement a=0 is replaced by a = -1, b= ?
c) If in second statement a=0 is replaced by a = -1, b=?

3. char *a[2];
int const *p;
int *const p;
struct new { int a;int b; *var[5] (struct new)}

Describe the statements in the above given construct ?
4. f()
{
int a=2;
f1(a++);
}
f1(int c)
{
printf("%d", c);
}
What is the value of c ?
5. f1()
{
f(3);
}
f(int t)
{
switch(t);
{
case 2: c=3;
case 3: c=4;
case 4: c=5;
case 5: c=6;
default: c=0;
}
What is the value of c?
6. What is the fallacy in the following program segment ?
int *f1()
{
int a=5;
return &a;
}
f()
int *b=f1()
int c=*b;
}
7. Give the C language equivalents of the following
a)Function returning an int pointer
b)Function pointer returning an int pointer
c)Function pointer returning an array of integers
d)Array of function pointer returning an array of integers
8. Find the fallacy in the following program segment?
int a;
short b;
b=a;

9. Define function ? Explain arguments in functions ?

10. How does C pass variables to a function ?
11. Explain the following program segment.
f(){
int *b;
*b=2;
}


12. Explain binary trees and their use ?
13. Draw the diagram showing the function stack, illustrating the variables that were pushed on the stack at the point when function f2 has been introduced .
type def struct
{ double x,double y} point; }
main( int argc, char *arg[3])
{ double a;
int b,c;
f1(a,b); }
f1(double x, int y)
{point p;
stack int n;
f2(p,x,y)
}
f2(point p, double angle)
{ int i,j,k,int max;
}

0 comments: