Section-2. English (error finding,15 questions)
Section-3. Number series (Letter series also)
Section-4. Analytical ability (5 questions)
Section-5 Numerical ability (additions,multiplications etc)
note: -marking 1:1
Intergraph:paper pattern only
Analytical. 1.seating arrangement
(Ref. GRE book)
C-language. 48 questions - 45 min.
1. Diff.between inlinefunction((++)-macns(c)
2. 3 to 4 questions on conditional operator :?:
3. Write a macro for sqaring no.
4. Trees -3 noded tree ( 4 to 5 questions fundamentals)
Maximum possible no.of arrnging these nodes
5. Arrange the nodes in depth first order
breadth first order
6. Linked lists Q) Given two statments
1. Allocating memory dynamiccaly
Tree the above both and find the mistake
7. Pointers (7 to 8 questions) Schaum series
Pointer to functions, to arrays
4 statements ->meaning,syntax for another 4 statements
8. Booting-def(When you on the system the process that takes place is ------
9. -----Type of global variable can be accessible from any where in the
working environment ( external global variable)
10. Which of the following can be accessed randomly
Ans. a. one way linked list
b. two way "
11. Write a class for a cycle purchase(data items req.)
1) Reversing a linked list. Given a linked list, reverse it. Input must be read from a file, "list.dat". It will just be a list of integers. The total number is not known. The program should create a linked list with the given numbers in the same order. Each node contains the value and a pointer to the next node of the list. Defining just TWO additional node pointers you must inverse the given list and print out the numbers in the list. NO OTHER VARIABLE of any type should be defined. Hence the output will be reverse of the input. eg. Input file reads, 3 1 4 2 Linked list will be, Head -> 3 -> 1 -> 4 -> 2 -> Null the the reversed list must be, Null <- 3 <- 1 <- 4 <- 2 <- Head So the output will be, 2,4,1,3.
Write a code to generate the (nasent) Koch curve. A (nasent) koch curve is drawn iteratively. At any iteration the curve is a set of straight lines. In every iteration each line from the previous iteration is split into three parts and the middle part is replaced with two sides of the equilateral triangles in which the middle part is the third side. You start with a straight line ______. (0,0)-(90,0) In the next iteration you get four lines __/\__ (0,0)-(30,0), (30,0)-(45,15*sqrt(3)), (45,15*sqrt(3))-(60,0) and (60,0)-(90,0) In the next iteration you apply the same division tecnique to all the four line segemetns (0,0)-(30,0), (30,0)-(45,15*sqrt(3)), (45,15*sqrt(3))-(60,0) and (60,0)-(90,0). And so on... Generate the points after n iterations starting with (0,0)-(x,0) Input: one integer for the number of iterations, n and one float for x. n is typically 6 to 8 Output: All the points of the koch curve after n iterations must be written to a file, "koch.dat" in order from left to right. Use all float values. eg. n=1, x=90 0 0 30 0 45 25.98 60 0 90 0 Note: x and y co-ordinates come alternately. A point occurs on two adjusent lines but is printed only once.
A list of persons represented by numbers 1 to n are given along with their enemies in that list. You must group them into two boats such that no person is in the same boat with his enemy. Assume a solution exists. eg. 1's enemies 2,3 2's enemies 1 3's enemies (none) 4's enemies 3 5's enemies 4,1 The groups will be 1,4 2,3,5 Input: Input should be read from a file, "enemies.dat". First the number of persons in the list is given. Then the enemies for each person is given, terminated by a zero. eg. for the discussed case, input will read 5 2 3 0 1 0 0 3 0 1 4 0 note: Numbers between third and fourth zeros are four's enemies. Output: Output should be printed on the screen as two lines. First line is the list of people on boat one and the next line is for boat two.
3) Enemies and boats. Many people gave different algorithms but most didn't work. One way of doing it is to put 1 in boat one, his enemies in boat two. See where 2 can be placed. If you have an inevitable option take it. Else try both option by recursion.
Do an Euler knight's tour. A knight starts at one of the squares of the chessboard and visits ALL the squares EXACTLY ONCE. Number the chessboard from 1 to 64 starting from one corner and traversing row wise. Start at square one and visit all the squares. Beware!! The brute force algorithm will burst out of memory! Output: Print out the number of the squares the knight visits in the order they are visited.
4) Euler's knight tour. The algorithm we had in mind was back tracking when you hit a dead end. But we got a much better algo. Start a one corner. At every step try to go to a corner if not possible try to go to a edge, otherwise goto some point. More generally goto the sqaure with the minimum number of squares leading to it. This algo works terrifically and gives instantaneous results.