## Welcome Guest

### Questions for Goldman Sachs (For CS)

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/gpl4you/public_html/_config-rating.php on line 26
Rate the Questions

Rating: 1.9/5

 Q. No. : 1 Question : Print a singly linked list in reverse order Solution Discuss
 Q. No. : 2 Question : Write me a function that receives three integer inputs for the lengths of the sides of a triangle and returns one of four values to determine the triangle type (1=scalene, 2=isosceles, 3=equilateral, 4=error). Generate test cases for the function assuming another developer coded the function Solution Discuss
 Q. No. : 3 Question : 5 6 7 8 8 8 8 8 What is the next number in the series ? Solution Discuss
 Q. No. : 4 Question : Which is faster ++a or a++? Solution Discuss
 Q. No. : 5 Question : What it wrong with this function: F1(...){ x = new(); F2(); delete x; } Solution Discuss
 Q. No. : 6 Question : Given 2 squares on a 2 dimensional plane, find a line that would cut these two squares in half. Solution Discuss
 Q. No. : 7 Question : Suppose you have a 100 files in a directory and you need to find out if a keyword occurs in these files. How would you do it in Unix? How would you do it in Windows? Solution Discuss
 Q. No. : 8 Question : Given a cube. A ant is placed in a corner and cannot move. A spider starts from the opposite corner, and can move along cube edges in any direction (x,y,z) with probablity 1/3. What is the expected number of steps for this spider to get to the ant? Solution Discuss
 Q. No. : 9 Question : What is: in-order traversal of tree, quick sort in an array Discuss
 Q. No. : 10 Question : A duck is in circular pond. The duck wants to swim ashore, because it wants to fly off and this particular duck is not able to start flying from the water. There is also a fox, on the shore. The fox wants to eat the duck, but this particular fox cannot swim, so it can only hope to catch the duck when the duck reaches the shore. The fox can run 4 times faster than the duck can swim. Is there always a way for the duck to escape? Solution Discuss
 Q. No. : 11 Question : Print Fibonacci series in order of log(n). Solution Discuss
 Q. No. : 12 Question : A computer has three registers, A, B and R. It has only three instructions: A->R : Load R with A B->R : Load R with B A-R->A : Subtract R from A and store the result in A Using these instructions how can you do the follwoing? B->A : Load A with B Solution Discuss
 Q. No. : 13 Question : Design an inventory tracking system using database tables. Customers, inventory, and orders are tracked. Then, write a query to find an order when you only have a lastname Solution Discuss
 Q. No. : 14 Question : What is static method? What is a static initializer? Solution Discuss
 Q. No. : 15 Question : Write a method to calculate the acute angle between a clock hour hand and minute hand. Solution Discuss
 Q. No. : 16 Question : Template vs. Inheritance. Why use one over the other? Solution Discuss
 Q. No. : 17 Question : Given a IP address, Validate the IP address. The IP address lies between [000.000.000.000]-[255.255.255.255] . IP address is in String, hence you can fetch the characters in the string and move ahead. Solution Discuss
 Q. No. : 18 Question : Virtual Functions and its implementation? Solution Discuss
 Q. No. : 19 Question : What’s the difference between these two declarations? struct str1 { … } ; typedef struct { … } str2 ; Solution Discuss
 Q. No. : 20 Question : Find the day of the week of a given date? Solution Discuss